PHP Browser

PHP Browser

Postby Bayron » Sat Mar 05, 2011 6:57 pm

Como FiveWeb se esta demorando mucho, y necesito hacer un formulario de consultas en la web, ayer me introduje a los tenebrosos nuevos rumbos en PHP, hasta ahora, ya logre mostrar la informacion en pantalla, e introducir nuevos registros...

Image
Mi pregunta es: Si existe la manera de hacer algo similar a un browse con la base de datos con PHP???
Hasta ahora no he visto ninguna manera de hacerlo....

Gracias por sus comentarios....
=====>

Bayron Landaverry
(215)2226600 Philadelphia,PA, USA
+(502)46727275 Guatemala
MayaBuilders@gMail.com

FWH12.04||Harbour 3.2.0 (18754)||BCC6.5||UEstudio 10.10||
Windows 7 Ultimate

FiveWin, One line of code and it's done...
User avatar
Bayron
 
Posts: 815
Joined: Thu Dec 24, 2009 12:46 am
Location: Philadelphia, PA

Re: PHP Browser

Postby Bayron » Sun Mar 06, 2011 3:07 am

Al parecer si se puede...
user: demo
password: demo

http://www.databrowser.org/databrowser/

Hojala alguien pueda orientarme a alguno mas complejo, o mas bien dicho, mas visualmente agradable....
=====>

Bayron Landaverry
(215)2226600 Philadelphia,PA, USA
+(502)46727275 Guatemala
MayaBuilders@gMail.com

FWH12.04||Harbour 3.2.0 (18754)||BCC6.5||UEstudio 10.10||
Windows 7 Ultimate

FiveWin, One line of code and it's done...
User avatar
Bayron
 
Posts: 815
Joined: Thu Dec 24, 2009 12:46 am
Location: Philadelphia, PA

Re: PHP Browser

Postby Enrico Maria Giordano » Sun Mar 06, 2011 7:59 am



This is not a browse, this is a simple HTML table.

EMG
User avatar
Enrico Maria Giordano
 
Posts: 8315
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: PHP Browser

Postby Bayron » Sun Mar 06, 2011 3:02 pm

Enrico,

Yes I know, and I understand that Web browsers (IE, Chrome, etc) use and administer the information in a different way...
I have been searching, and the only thing close enough to our Browsers, is what is called a DataGrid:

Image

http://www.phpgrid.com/

Most of the information is handled by a table array with links to editing code, but nothing similar to a FiveWin Browser....

I guess it is more complicated of what I expected...(I just started a couple of days ago with PHP, so It will take me a little while, but as somebody said "All that it takes is code", PHP is just another programming language, and even if it has to be hardcoded, I am 99.99% certain it can be done, by just capturing the SQL Select Query, counting the records number and Pointer numbers, building an array and doing some magic)
Of course, by just starting, I have no Idea of how to doit yet, so any help on Ideas of how to capture this information will be appreciated...
=====>

Bayron Landaverry
(215)2226600 Philadelphia,PA, USA
+(502)46727275 Guatemala
MayaBuilders@gMail.com

FWH12.04||Harbour 3.2.0 (18754)||BCC6.5||UEstudio 10.10||
Windows 7 Ultimate

FiveWin, One line of code and it's done...
User avatar
Bayron
 
Posts: 815
Joined: Thu Dec 24, 2009 12:46 am
Location: Philadelphia, PA

Re: PHP Browser

Postby Enrico Maria Giordano » Sun Mar 06, 2011 3:27 pm

The "problem" with web scripting languages is that the final result has to be HTML.

EMG
User avatar
Enrico Maria Giordano
 
Posts: 8315
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: PHP Browser

Postby Bayron » Sun Mar 06, 2011 3:36 pm

Now with our friend Google, everything is easer, if we know how to look for....!!!

Code: Select all  Expand view
id               name            type       price
123451  Park's Great Hits       Music      19.99
123452  Silly Puddy             Toy         3.99
123453  Playstation             Toy        89.95
123454  Men'
s T-Shirt           Clothing    32.50
123455  Blouse                  Clothing    34.97
123456  Electronica 2002        Music        3.99
123457  Country Tunes           Music       21.55
123458  Watermelon              Food         8.73

 


Code: Select all  Expand view
<?php
// Make a MySQL Connection

$query = "SELECT type, COUNT(name) FROM products GROUP BY type";
     
$result = mysql_query($query) or die(mysql_error());

// Print out result
while($row = mysql_fetch_array($result)){
    echo "There are ". $row['COUNT(name)'] ." ". $row['type'] ." items.";
    echo "<br />";
}
?>

Code: Select all  Expand view
There are 2 Clothing items.
There are 1 Food items.
There are 3 Music items.
There are 2 Toy items.
 


And Using the CLAUSE "LIMIT" in the Query, I think something can be done... (I am just guessing, since I don't know anything yet about MySQL either)
=====>

Bayron Landaverry
(215)2226600 Philadelphia,PA, USA
+(502)46727275 Guatemala
MayaBuilders@gMail.com

FWH12.04||Harbour 3.2.0 (18754)||BCC6.5||UEstudio 10.10||
Windows 7 Ultimate

FiveWin, One line of code and it's done...
User avatar
Bayron
 
Posts: 815
Joined: Thu Dec 24, 2009 12:46 am
Location: Philadelphia, PA

Re: PHP Browser

Postby Bayron » Sun Mar 06, 2011 3:41 pm

Enrico Maria Giordano wrote:The "problem" with web scripting languages is that the final result has to be HTML.

EMG


I am afraid it is true,

But I am thinking, that at least if we can capture some mouse events and keystrokes, we can manipulate the HTML results...(Maybe using AJAX, so we don't have to reload the entire page)
=====>

Bayron Landaverry
(215)2226600 Philadelphia,PA, USA
+(502)46727275 Guatemala
MayaBuilders@gMail.com

FWH12.04||Harbour 3.2.0 (18754)||BCC6.5||UEstudio 10.10||
Windows 7 Ultimate

FiveWin, One line of code and it's done...
User avatar
Bayron
 
Posts: 815
Joined: Thu Dec 24, 2009 12:46 am
Location: Philadelphia, PA

Re: PHP Browser

Postby Enrico Maria Giordano » Sun Mar 06, 2011 4:04 pm

Yes, this is probably true but I think it would be a huge work.

EMG
User avatar
Enrico Maria Giordano
 
Posts: 8315
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: PHP Browser

Postby Enrico Maria Giordano » Sun Mar 06, 2011 4:05 pm

And what about the compatibility with different OSs and different browsers? A nightmare...

EMG
User avatar
Enrico Maria Giordano
 
Posts: 8315
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: PHP Browser

Postby Bayron » Sun Mar 06, 2011 4:16 pm

As usual, Enrico, thank for sharing your thoughts, they help me a lot...

I have way too many unfinished projects right now, so I will keep this in my dresser drawer for now, and use the weel as it is...

Some times we get excited to start something new, and we forget what we have not finished yet...
=====>

Bayron Landaverry
(215)2226600 Philadelphia,PA, USA
+(502)46727275 Guatemala
MayaBuilders@gMail.com

FWH12.04||Harbour 3.2.0 (18754)||BCC6.5||UEstudio 10.10||
Windows 7 Ultimate

FiveWin, One line of code and it's done...
User avatar
Bayron
 
Posts: 815
Joined: Thu Dec 24, 2009 12:46 am
Location: Philadelphia, PA

Re: PHP Browser

Postby Enrico Maria Giordano » Sun Mar 06, 2011 4:55 pm

I didn't want to stop your dreams and imagination, sorry. :-)

EMG
User avatar
Enrico Maria Giordano
 
Posts: 8315
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: PHP Browser

Postby Bayron » Sun Mar 06, 2011 5:13 pm

Enrico, you did not, but you are right about being a big project, and I have a lot to take care of first, especially with my family, so I will approach this later...

Your insight is always welcome....!!!
=====>

Bayron Landaverry
(215)2226600 Philadelphia,PA, USA
+(502)46727275 Guatemala
MayaBuilders@gMail.com

FWH12.04||Harbour 3.2.0 (18754)||BCC6.5||UEstudio 10.10||
Windows 7 Ultimate

FiveWin, One line of code and it's done...
User avatar
Bayron
 
Posts: 815
Joined: Thu Dec 24, 2009 12:46 am
Location: Philadelphia, PA

Re: PHP Browser

Postby Bayron » Wed Mar 09, 2011 1:25 pm

Hi everybody, I think that instead of reinventing the weel, I will use what already is available... So far I acomplished this using Kool PHPSuite, somehow similar to FiveWin...
http://demo.koolphp.net/Examples/KoolPHPSuite/index.php

Image
Image
Image
Image
Image
Image
=====>

Bayron Landaverry
(215)2226600 Philadelphia,PA, USA
+(502)46727275 Guatemala
MayaBuilders@gMail.com

FWH12.04||Harbour 3.2.0 (18754)||BCC6.5||UEstudio 10.10||
Windows 7 Ultimate

FiveWin, One line of code and it's done...
User avatar
Bayron
 
Posts: 815
Joined: Thu Dec 24, 2009 12:46 am
Location: Philadelphia, PA

Re: PHP Browser

Postby Carlos Mora » Fri Mar 25, 2011 12:19 pm

Hi Byron,

Nice sample. Reeading the post I realized that there is a important think is being missed: the web is stateless, that is, the server knows nothing about the request, so capturing keys and mouse is not the right way.

look at flexigrid, it's a nice product, and relatively easy to use if you know php.

Best regards.
Saludos
Carlos Mora
http://harbouradvisor.blogspot.com/
StackOverflow http://stackoverflow.com/users/549761/carlos-mora
“If you think education is expensive, try ignorance"
Carlos Mora
 
Posts: 988
Joined: Thu Nov 24, 2005 3:01 pm
Location: Madrid, España

Re: PHP Browser

Postby Bayron » Fri Mar 25, 2011 1:48 pm

Hi Carlos,
I have looked at FlexiGrid, and it is great, but what I found in KoolPHP, was more than a Grid, It was a complete set of controls that can be implemented with a few lines of code, prety much as we use FiveWin Controls now... I guess Flexigrid it's the same way too...

KoolPHP can be used to build more than a Data Driven Web Site, but a complete Web Application, of course if one have's HTML, CSS and PHP knowledge...

This is an example of how I implemented the Tree:

Code: Select all  Expand view
<?php
  $KoolControlsFolder = "";
    require $KoolControlsFolder."koolControls/KoolTreeView/kooltreeview.php";
       
    $treeview = new KoolTreeView("treeview");
    $treeview->scriptFolder = $KoolControlsFolder."koolControls/KoolTreeView";
    $treeview->imageFolder=$KoolControlsFolder."koolControls/KoolTreeView/icons";
   
    $root = $treeview->getRootNode();
    $root->text = "My Properties";
    $root->expand=true;
    $root->image="woman2S.gif";
    $treeview->Add("root","hardware","Hardware",false,"xpNetwork.gif","");
    $treeview->Add("hardware","laptop","HP dv2500 Laptop",false,"square_blueS.gif","")
    $treeview->Add("hardware","desktop","Lenovo desktop",false,"square_greenS.gif","");
    $treeview->Add("hardware","lcd","Asus 19\" LCD",false,"square_redS.gif","");
   
    $treeview->Add("root","software","Software",true,"ie.gif","");
    $treeview->Add("software","os","Operating System",true,"bfly.gif","");
    $treeview->Add("os","linux","Ubuntu 8.10",false,"ball_redS.gif","");
    $treeview->Add("os","windows","Vista Home Edition",false,"ball_blueS.gif","");
    $treeview->Add("software","office","Office",false,"doc.gif","");
    $treeview->Add("office","msoffice","Microsoft Office 2007",false,"square_redS.gif","");
    $treeview->Add("office","ooffice","Open Office 2.4",false,"square_greenS.gif","");
    $treeview->Add("software","burning","Burn CD/DVD",false,"xpShared.gif","");
    $treeview->Add("burning","nero","Nero 8",false,"triangle_yellowS.gif","");
    $treeview->Add("burning","k3b","K3B <i>(on Ubuntu)</i>",false,"triangle_blueS.gif","");
    $treeview->Add("software","imageeditor","Image editors",false,"goblet_bronzeS.gif","");
    $treeview->Add("imageeditor","photoshop","Photoshop 10",false,"ball_glass_blueS.gif","");
    $treeview->Add("imageeditor","gimp","GIMP 2.3.4",false,"ball_glass_greenS.gif","");
   
    $treeview->Add("root","book","Books",true,"book.gif","");
    $treeview->Add("book","ajax","Ajax For Dummies",false,"BookY.gif","");
    $treeview->Add("book","csharp","Mastering C#",false,"BookY.gif","");
    $treeview->Add("book","flash","Flash 8 Bible",false,"BookY.gif","");
    $treeview->showLines = true;
   
    $style_select = "default";
   
    if(isset($_POST["style_select"]))
    {
        $style_select = $_POST["style_select"];
    }
    $treeview->styleFolder=$style_select;
       
?>
 
<form id="form1" method="post">
 
    Select style:
    <select id="style_select" name="style_select" onchange="submit();">
        <option value="default"     <?php if ($style_select=="default") echo "selected" ?> >Default</option>
        <option value="vista"       <?php if ($style_select=="vista") echo "selected" ?> >Vista</option>       
        <option value="hay"         <?php if ($style_select=="hay") echo "selected" ?> >Hay</option>       
        <option value="inox"        <?php if ($style_select=="inox") echo "selected" ?> >Inox</option>     
        <option value="office2007"  <?php if ($style_select=="office2007") echo "selected" ?> >Office2007</option>     
        <option value="outlook"     <?php if ($style_select=="outlook") echo "selected" ?> >Outlook</option>       
        <option value="silver"      <?php if ($style_select=="silver") echo "selected" ?> >Silver</option>     
        <option value="gray"        <?php if ($style_select=="gray") echo "selected" ?> >Gray</option>
        <option value="graygreen"   <?php if ($style_select=="graygreen") echo "selected" ?> >Graygreen</option>
        <option value="pink"        <?php if ($style_select=="pink") echo "selected" ?> >Pink</option>     
        <option value="green"       <?php if ($style_select=="green") echo "selected" ?> >Green</option>       
        <option value="darkgray"    <?php if ($style_select=="darkgray") echo "selected" ?> >Darkgray</option>
    </select>
   
    <div style="padding:10px;">
        <?php echo $treeview->Render();?>
    </div>
</form>
 


I started looking at PHP a couple of weeks ago, so I don't know much, and still waiting to see the devepment of FiveWeb by Laiton, and to see what Mr. Linares says about his project on FiveTech Web, that he promissed to release on April /2010, so we'll see...

Antonio Linares wrote:March 2010
==========
* We keep quite busy working on the new FiveTech Web & Facebook development API that we expect to publish next month :-)
=====>

Bayron Landaverry
(215)2226600 Philadelphia,PA, USA
+(502)46727275 Guatemala
MayaBuilders@gMail.com

FWH12.04||Harbour 3.2.0 (18754)||BCC6.5||UEstudio 10.10||
Windows 7 Ultimate

FiveWin, One line of code and it's done...
User avatar
Bayron
 
Posts: 815
Joined: Thu Dec 24, 2009 12:46 am
Location: Philadelphia, PA

Next

Return to Off Topic / Otros temas

Who is online

Users browsing this forum: No registered users and 20 guests