Closed Thread
Page 2 of 2 FirstFirst 12
Results 16 to 26 of 26

Thread: QuickPHP

  1. #16
    Sup, Recoil here. themoose has a reputation beyond reputethemoose has a reputation beyond reputethemoose has a reputation beyond reputethemoose has a reputation beyond reputethemoose has a reputation beyond reputethemoose has a reputation beyond reputethemoose has a reputation beyond reputethemoose has a reputation beyond reputethemoose has a reputation beyond reputethemoose has a reputation beyond reputethemoose has a reputation beyond repute themoose's Avatar
    Join Date
    Jun 2005
    Location
    Uzbekistan
    Posts
    8,805
    No worries Decker

    v0.3 includes open/save functions. There's also some commented out code you can see that is work-in-progress to set the include directory to wherever the code you opened is at. Couldn't quite finish it though, and goddamnit I have revision to do


    PHP Code:
    <?php

    include("include/winbinder.php"); 
    $mainwin wb_create_window(NULLAppWindow"QuickPHP"600493); 

    wb_create_control($mainwinEditBox"",                  1035480425,     101WBC_MULTILINE); 
    wb_create_control($mainwinPushButton"Execute",        500,358022,     102); 
    wb_create_control($mainwinPushButton"Help/About",     500,608022,     103); 
    wb_create_control($mainwinComboBox"",                 500,858090,  105);
    $a_combo = array("Plain""HTML");
    wb_set_text(wb_get_control($mainwin105), $a_combo);

    wb_create_control($mainwinEditBox"",                  10848022,     150); 
    wb_create_control($mainwinPushButton"Choose",        500,88022,     151); 

      
    /* currently out of action, may include sometime soon
      if(trim($location = file_get_contents("location.qpini")) == "") {
        wb_set_text(wb_get_control($mainwin, 150), getcwd());
      } else {
        wb_set_text(wb_get_control($mainwin, 150), $location);
      }
      */

    wb_set_handler($mainwin"process_main"); 
    wb_main_loop();

    function 
    process_main($window$id)
    {
        switch(
    $id) { 



        case 
    102
            
                
    $getboxvalue wb_get_textwb_get_control$window101 ) );
                
                
    /* currently out of action, may include sometime soon
                if(strlen(wb_get_text(wb_get_control($window, 150))) > 1) {
            $includepath = explode("\\", wb_get_text(wb_get_control($window, 150)));
            $includepath = str_replace("\\", "/", str_replace("\\".$includepath[count($includepath)-1], "", wb_get_text(wb_get_control($window, 150))));
            $getboxvalue = '<\?php \n ini_set(\"include_path", ".:../:./include:../include:'.$includepath.'\"); \n \?>'.$getboxvalue;
          }
          */
          
    if(substr($getboxvalue02) == "<"."?") {
            
    $getboxvalue str_replace(array("####<?"."php""?".">####"), """####".trim($getboxvalue)."####");
                }
          
    ob_start();
                eval(
    $getboxvalue);
                
    $result ob_get_contents();
                
    ob_clean();
                
                if(
    wb_get_textwb_get_control$window105 ) ) == "Plain") {
            
    $reswin wb_create_window(NULLAppWindow"Output"600493); 
            
    wb_create_control($reswinEditBox$result,   1010570450,     104WBC_MULTILINE); 
            
    wb_set_handler($reswin"process_results");
            
    wb_main_loop();
          } elseif(
    wb_get_textwb_get_control$window105 ) ) == "HTML") {
            
    $handle fopen("out.html"'w+');
            
    fwrite($handle$result);
            
    fclose($handle);
            
    wb_exec("out.html");
          } 
             break; 
             case 
    103:
                
    wb_message_box($window"Simply enter the code you want to test quickly and click \"Execute\". \nPlease note this will execute on your actual system so if you use commands like exec(), unlink(), and others it WILL have effect.\n\nThis isn't meant for executing full scripts, just small ones to see if they work or to quickly generate lists etc.\n\nTo view the output as HTML, choose \"HTML\" from the drop-down.""About QuickPHP");
             break;

        case 
    151:
          
    $filter = array(array('PHP Files','*.php'), array('PHPS Files''*.phps'), array('HTML Files''*.html'), array('All Files''*.*'));
          
    $filename wb_sys_dlg_open(NULL'Open file'$filter,$path);
          if(
    $filename) {
            
    wb_set_text(wb_get_control($window150), $filename);
            
    wb_set_text(wb_get_control($window101), file_get_contents($filename));
            
    wb_create_control($windowPushButton"Save",     500,1108022,     152); 
            
    $includepath explode("\\"$filename);
            
    $includepath str_replace($includepath[count($includepath)-1], ""$filename);
          }
        break;
        
        case 
    152:
            
    $handle fopen(wb_get_text(wb_get_control($window150)), 'w+');
            
    fwrite($handlewb_get_text(wb_get_control($window101)));
            
    fclose($handle);
        break;
             
            case 
    IDCLOSE
                
    wb_destroy_window($window); 
                break; 


                
         }     
    }

    function 
    process_results($window$id
    {
           switch(
    $id) {
            case 
    IDCLOSE:
                
    wb_destroy_window($window);
                break;
           }
    }

    ?>
    http://rapidshare.com/files/119120134/QuickPHPv0.3.zip


    NOTE: All these extra options are 100&#37; optional - it's still meant for quick code! The first code you saw in the very first image would still work in the exact same way!

  2. #17
    stop staring krakjoe is a splendid one to beholdkrakjoe is a splendid one to beholdkrakjoe is a splendid one to beholdkrakjoe is a splendid one to beholdkrakjoe is a splendid one to beholdkrakjoe is a splendid one to beholdkrakjoe is a splendid one to beholdkrakjoe is a splendid one to beholdkrakjoe is a splendid one to behold krakjoe's Avatar
    Join Date
    May 2006
    Location
    UK
    Posts
    3,616
    && krakjoe stylee ...



    http://interviolet.com/QuickPHP-kraked.zip

    No need to keep the sources ... this might not run on systems using xp still you'll need to recompile, sources included ...

    Adding syntax highlighting is not trivial, the only viable solution is a library / control called Scintilla, no one has done it yet ( that I'm aware of, lots of talk but no action ) ... maybe one day ... maybe someone ... just not me ...
    (\__/) Joe Watkins
    (='.'=) Software Architect
    (")_(") http://pthreads.org
    Copy and paste bunny into your sig, help him gain world domination.

  3. #18
    Sup, Recoil here. themoose has a reputation beyond reputethemoose has a reputation beyond reputethemoose has a reputation beyond reputethemoose has a reputation beyond reputethemoose has a reputation beyond reputethemoose has a reputation beyond reputethemoose has a reputation beyond reputethemoose has a reputation beyond reputethemoose has a reputation beyond reputethemoose has a reputation beyond reputethemoose has a reputation beyond repute themoose's Avatar
    Join Date
    Jun 2005
    Location
    Uzbekistan
    Posts
    8,805
    Okay, last update for today. v0.4 sets the include_path if you open a file, to the path that the file is in.

    It's still not a suitable replacement for XAMPP, but for quick php use and for non-advanced users, it's still easier

    http://rapidshare.com/files/11913528...kPHPv0.4.1.zip
    PHP Code:
    <?php

    include("include/winbinder.php"); 
    $mainwin wb_create_window(NULLAppWindow"QuickPHP"600493); 

    wb_create_control($mainwinEditBox"",                  1035480425,     101WBC_MULTILINE); 
    wb_create_control($mainwinPushButton"Execute",        500,358022,     102); 
    wb_create_control($mainwinPushButton"Help/About",     500,608022,     103); 
    wb_create_control($mainwinComboBox"",                 500,858090,  105);

    $a_combo = array("Plain""HTML");
    wb_set_text(wb_get_control($mainwin105), $a_combo);

    wb_create_control($mainwinEditBox"",                  10848022,     150); 
    wb_create_control($mainwinPushButton"Choose",        500,88022,     151); 
    wb_create_control($mainwinPushButton"Save",     500,1108022,     152);

    wb_set_handler($mainwin"process_main"); 
    wb_main_loop();

    function 
    process_main($window$id)
    {
        switch(
    $id) { 



        case 
    102
            
                
    $getboxvalue wb_get_textwb_get_control$window101 ) );
                
                if( 
    wb_get_textwb_get_control$window150 ) ) ) {
            
    $includepath explode("\\"wb_get_text(wb_get_control($window150)));
            
    $includepath str_replace("\\""/"str_replace("\\".$includepath[count($includepath)-1], ""wb_get_text(wb_get_control($window150))));
            
    $getboxvalue '<?php ini_set("include_path", "'.$includepath.'");  ?>'.$getboxvalue;
          }
          
          if(
    substr($getboxvalue02) == "<"."?") {
            
    $getboxvalue str_replace(array("####<?"."php""?".">####"), """####".trim($getboxvalue)."####");
                }
          
    ob_start();
                eval(
    $getboxvalue);
                
    $result ob_get_contents();
                
    ob_clean();
                
                if(
    wb_get_textwb_get_control$window105 ) ) == "Plain") {
            
    $reswin wb_create_window(NULLAppWindow"Output"600493); 
            
    wb_create_control($reswinEditBox$result,   1010570450,     104WBC_MULTILINE); 
            
    wb_set_handler($reswin"process_results");
            
    wb_main_loop();
          } elseif(
    wb_get_textwb_get_control$window105 ) ) == "HTML") {
            
    $handle fopen("out.html"'w+');
            
    fwrite($handle$result);
            
    fclose($handle);
            
    wb_exec("out.html");
          } 
             break; 
             case 
    103:
                
    wb_message_box($window"Simply enter the code you want to test quickly and click \"Execute\". \nPlease note this will execute on your actual system so if you use commands like exec(), unlink(), and others it WILL have effect.\n\nThis isn't meant for executing full scripts, just small ones to see if they work or to quickly generate lists etc.\n\nTo view the output as HTML, choose \"HTML\" from the drop-down.""About QuickPHP");
             break;

        case 
    151:
          
    $filter = array(array('PHP Files','*.php'), array('PHPS Files''*.phps'), array('HTML Files''*.html'), array('All Files''*.*'));
          
    $filename wb_sys_dlg_open(NULL'Open file'$filter,$path);
          if(
    $filename) {
            
    wb_set_text(wb_get_control($window150), $filename);
            
    wb_set_text(wb_get_control($window101), file_get_contents($filename)); 
            
    $includepath explode("\\"$filename);
            
    $includepath str_replace($includepath[count($includepath)-1], ""$filename);
          }
        break;
        
        case 
    152:
            if(
    wb_get_text(wb_get_control($window150)) == "") {
              
    $filter = array(array('PHP Files','*.php'), array('PHPS Files''*.phps'), array('HTML Files''*.html'), array('TXT Files''*.txt'), array('All Files''*.*'));
              
    $filename wb_sys_dlg_save(NULL'Save file'$filter);
              
    wb_set_text(wb_get_control($window150), $filename);
            } 
            if(
    wb_get_text(wb_get_control($window150)) !== "") {
            
    $handle fopen(wb_get_text(wb_get_control($window150)), 'w+');
            
    fwrite($handlewb_get_text(wb_get_control($window101)));
            
    fclose($handle);
            }
        break;
             
            case 
    IDCLOSE
                
    wb_destroy_window($window); 
                break; 


                
         }     
    }

    function 
    process_results($window$id
    {
           switch(
    $id) {
            case 
    IDCLOSE:
                
    wb_destroy_window($window);
                break;
           }
    }

    ?>
    edit: your post just popped up joe

    Nicely done, I like the seperate windows
    Last edited by themoose; May 31st, 2008 at 13:40.

  4. #19
    stop staring krakjoe is a splendid one to beholdkrakjoe is a splendid one to beholdkrakjoe is a splendid one to beholdkrakjoe is a splendid one to beholdkrakjoe is a splendid one to beholdkrakjoe is a splendid one to beholdkrakjoe is a splendid one to beholdkrakjoe is a splendid one to beholdkrakjoe is a splendid one to behold krakjoe's Avatar
    Join Date
    May 2006
    Location
    UK
    Posts
    3,616
    I have almost a trillion windows open all the time, the very last thing I need is another window ... with a bullet in the face coming in close second ...

    It's a nice idea ... might be better to use the php5 version of phpCompile though as that's what people are using now ...
    (\__/) Joe Watkins
    (='.'=) Software Architect
    (")_(") http://pthreads.org
    Copy and paste bunny into your sig, help him gain world domination.

  5. #20
    #anonymous Decker has a reputation beyond reputeDecker has a reputation beyond reputeDecker has a reputation beyond reputeDecker has a reputation beyond reputeDecker has a reputation beyond reputeDecker has a reputation beyond reputeDecker has a reputation beyond reputeDecker has a reputation beyond reputeDecker has a reputation beyond reputeDecker has a reputation beyond reputeDecker has a reputation beyond repute Decker's Avatar
    Join Date
    Dec 2003
    Location
    West Yorkshire, Englandshire
    Posts
    10,145
    Keep this one going, and so far in one day (less than) you pair have came up with one cracking (no pun intended) and very usefull proggy.

    PS first time today Rapidshare has asked for the authentication - hate that feckin where are the cats thing, it's almost impossible to get sometimes - boycot them.
    /\__/\ We Do Not Forgive!
    (- o *) We Do Not Forget!
    (")_(") Expect Us!
    IT Help for everyone @ Scotia-IT.com - when it's finished

  6. #21
    Sup, Recoil here. themoose has a reputation beyond reputethemoose has a reputation beyond reputethemoose has a reputation beyond reputethemoose has a reputation beyond reputethemoose has a reputation beyond reputethemoose has a reputation beyond reputethemoose has a reputation beyond reputethemoose has a reputation beyond reputethemoose has a reputation beyond reputethemoose has a reputation beyond reputethemoose has a reputation beyond repute themoose's Avatar
    Join Date
    Jun 2005
    Location
    Uzbekistan
    Posts
    8,805
    Quote Originally Posted by Decker View Post
    Keep this one going, and so far in one day (less than) you pair have came up with one cracking (no pun intended) and very usefull proggy.

    PS first time today Rapidshare has asked for the authentication - hate that feckin where are the cats thing, it's almost impossible to get sometimes - boycot them.
    Sorry, I went over my RapidShare limit (25gb/5days).

  7. #22
    #anonymous Decker has a reputation beyond reputeDecker has a reputation beyond reputeDecker has a reputation beyond reputeDecker has a reputation beyond reputeDecker has a reputation beyond reputeDecker has a reputation beyond reputeDecker has a reputation beyond reputeDecker has a reputation beyond reputeDecker has a reputation beyond reputeDecker has a reputation beyond reputeDecker has a reputation beyond repute Decker's Avatar
    Join Date
    Dec 2003
    Location
    West Yorkshire, Englandshire
    Posts
    10,145
    So'k I got it

    Son of Bryon
    /\__/\ We Do Not Forgive!
    (- o *) We Do Not Forget!
    (")_(") Expect Us!
    IT Help for everyone @ Scotia-IT.com - when it's finished

  8. #23
    Sup, Recoil here. themoose has a reputation beyond reputethemoose has a reputation beyond reputethemoose has a reputation beyond reputethemoose has a reputation beyond reputethemoose has a reputation beyond reputethemoose has a reputation beyond reputethemoose has a reputation beyond reputethemoose has a reputation beyond reputethemoose has a reputation beyond reputethemoose has a reputation beyond reputethemoose has a reputation beyond repute themoose's Avatar
    Join Date
    Jun 2005
    Location
    Uzbekistan
    Posts
    8,805
    Project has been opened on my CubedLabs website

    http://www.cubedlabs.com/quickphp.php

    Download links are at the bottom - in php4 and php5 - php5 handles errors nicer!

    This is still the official development thread. If anybody contributes, please include the source in [php] tags, along with a pre-compiled version of the code.

  9. #24
    It gets better. Dynash has a brilliant futureDynash has a brilliant futureDynash has a brilliant futureDynash has a brilliant futureDynash has a brilliant futureDynash has a brilliant futureDynash has a brilliant futureDynash has a brilliant futureDynash has a brilliant futureDynash has a brilliant futureDynash has a brilliant future
    Join Date
    Jan 2008
    Location
    United Kingdom
    Posts
    4,534
    I love this, but is there a way to make an error, to tell you what the problem is (if any), because whenever I try

    PHP Code:
    <?php
    // commented
    echo 'uncommented';
    ?>
    it works right, but whenever I do a mistake like:
    PHP Code:
    <?php
    commented
    echo "uncommented";
    ?>
    it just shows blank.
    JavaKrypt

    "If you think education is expensive. You should see the cost of ignorance."

  10. #25
    Sup, Recoil here. themoose has a reputation beyond reputethemoose has a reputation beyond reputethemoose has a reputation beyond reputethemoose has a reputation beyond reputethemoose has a reputation beyond reputethemoose has a reputation beyond reputethemoose has a reputation beyond reputethemoose has a reputation beyond reputethemoose has a reputation beyond reputethemoose has a reputation beyond reputethemoose has a reputation beyond repute themoose's Avatar
    Join Date
    Jun 2005
    Location
    Uzbekistan
    Posts
    8,805
    Hm, it's blank in the php5 compiled code but it's showing the errors in the php4 version.

    Very odd because it's the exact same code that's being compiled..

  11. #26
    Hrm? Tree is a name known to allTree is a name known to allTree is a name known to allTree is a name known to allTree is a name known to allTree is a name known to allTree is a name known to all Tree's Avatar
    Join Date
    Aug 2005
    Location
    /home
    Posts
    3,059
    Minor bug, Ctrl+a doesn't work in the textbox.
    Life is very short, and there's no time for fussing and fighting my friend.

Closed Thread

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts