Re: [PHP] Explorer-like drill down interface

2002-09-26 Thread Bill Farrell

Y'know?  I started fiddling with the drill-down I had
made and found that the thing only worked on the
latest Mozilla.  Seems the developers made the same
mistake I did in what input type=image ... is
supposed to do.  Looks great on one browser :-)

I wound up with another alternative:  a folder view
with wayback's to ascend in the tree.  The code that
works better on all browsers can be seen on
http://www.jwfarrell.com/listtree.php.  I'll make the
code and support files available to anyone who wants a
copy.  Apologies for the pretty (but ineffectual)
version 1.

:-)
Bill


=
Bill Farrell
Multivalue and *nix Support Specialist

Phone: (828) 667-2245
Fax:   (928) 563-5189
Web:   http://www.jwfarrell.com

__
Do you Yahoo!?
New DSL Internet Access from SBC  Yahoo!
http://sbc.yahoo.com

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Explorer-like drill down interface

2002-09-25 Thread Richard Fox

I have two questions:

1. I would like to build a php page that contains a Windows explorer-like drill down 
mechanism, where clicking the '+' beside an item will expand the sub-items below 
(which can also have a '+' or '-' on the left) and clicking the '-' will collapse the 
item. Is there any existing code for that or hints how I can do it?

2. I have allowed packets through my firewall destined for port 3306, the mysql 
server. So I can connect to the server from a remote machine. Are there any known 
security vulnerabilities in the mySQL server? 

Many thanks,

Rich




Re: [PHP] Explorer-like drill down interface

2002-09-25 Thread Bill Farrell

Hi Richard,

There are a couple out there... I created one for
myself (V1.un) that does something similar...  It
relies on a couple of support files for mime-types and
icons.  Here's the code... if you like the idea, I can
zip up the icons and extension-to-mime folders and
send it to ya.  My website (www.jwfarrell.com) is
supposed to be online later this afternoon (after a
week of promises from my ISP), so you'll be able to
look at the code in action.

B

listtree.php
?php
$MetaTitle = Locally-Mirrored Documentation;
$MetaDescription =Answerbase for Multivalue
Programmers;
$MetaKeywords =  UNIVERSE, UNIDATA, APACHE PERL, HTML
REFERENCE, CSS, CASCADING STYLE SHEET, REFERENCE,
SEARCH;
include( style/htmlhead.php );

$SuppressSearch = false;
$OnLoad = ;
include(style/bodytemplate_top.php);

// user config
$Gaol = $DocRoot/help;// set a ceiling so people
don't prowl the system
$GaolURL = /help; // ceiling in URLspace
$IconsFolder = $DocRoot/graphics/icons;   // directory
for icons
$MimeTypeFolder = $DocRoot/ext2mime;  //
extension-to-icon map

$Subdirectories = array();
$SimpleFiles = array();
$TitleStart = ThEtItLe;
$TitleReplacement = MV_FM . $TitleStart . MV_FM;
$TitleEnd = MV_FM;

//echo Method is $Methodbr\n;
?

h2Browse the Documentation Tree/h2

form action=/listtree.php method=POST
fieldset style=width: 500px; text-align: left;
text-indent: 0em;

table border=0 cellpadding=0 cellspacing=0
width=100%
col style=width: 20px;
col style=width: 20px;
col

captionFolder contents/caption

?php
unset( $DocDirectory );

if ( $Method == POST ) {
$TargetFolder = $Folder;
if (  substr( $TargetFolder, -2 ) != '..' ) {
if ( $TargetFolder == $GaolURL ) { $TargetFolder =
; }
//echo Setting folders from $TargetFolderbr\n;

$DocArray = explode( '/', $TargetFolder );
$DocDirectoryArray = array_slice( $DocArray, 1 );
$DocDirectory = implode( '/', $DocDirectoryArray );
$CurrentFolder = $TargetFolder;

//echo Doc Directory is $DocDirectorybr\n;
$FullPath = explode( '/', $DocDirectory );
$PreviousDirectoryArray = array_slice( $FullPath, 0,
count( $FullPath ) - 2 );
$PreviousDirectory = implode( '/',
$PreviousDirectoryArray );

$FullURL = explode( '/', $CurrentFolder );
$PreviousFolderArray = array_slice( $FullURL, 0,
count( $FullURL ) - 1 );
$PreviousFolder = implode( '/', $PreviousFolderArray
);

}
}

// init tree - disallow attempts to go above gaol
if ( ( !isset( $DocDirectory ) ) | ( strlen(
$DocDirectory )  strlen( $GaolURL ) ) ) {
$DocDirectory = $Gaol;
$DocDirectoryArray = array( $DocDirectory );
$CurrentFolder = $GaolURL;
$PreviousFolderArray = array(  );
$PreviousFolder = ;
}

if ( ( $Docs = opendir( $DocDirectory ) ) === false )
{ die( $DocDirectory doesn't exist! ); }

while ( false !== ( $Subdir = readdir( $Docs ) ) ) {
if ( ( substr( $Subdir, 0, 1 ) != . ) ) {
if ( is_dir( $DocDirectory/$Subdir ) ) {
array_push( $Subdirectories, $Subdir );
} else {
array_push( $SimpleFiles, $Subdir );
}
}
}

sort( $Subdirectories );
sort( $SimpleFiles );

?
tr
thnbsp;/th
thnbsp;/th
thName/th
thSize/th
/tr


?php
$Level = 0; // how many t-bars in?

echo tr\n;
echo td align=\left\ valign=\top\
style=\line-height: 125%;\a href=\/help\img
style=\border: none;background: transparent;
line-height: 110%;\ height=\16\
src=\/graphics/icons/folder_home.png\/td\n;
echo tdnbsp;/td\n;
echo tdDocumentation Home Page/td\n;
echo /tr\n;

echo trtdnbsp;/td/td\n;

if ( $DocDirectory != $Gaol ) {
echo tr\n;
echo td align=\left\ valign=\top\input
name=\Folder\ style=\border: none;background:
transparent;\ type=\image\ height=\16\ value=\\
src=\/graphics/icons/mark_top.gif\/td\n;
echo tdnbsp;/td\n;
echo tdTop of the Tree/td\n;
echo /tr\n;

echo trtdnbsp;/td/tr\n;

echo tr\n;
echo td align=\left\ valign=\top\input
name=\Folder\ style=\border: none;background:
transparent;\ type=\image\ height=\16\
value=\$PreviousFolder\
src=\/graphics/icons/back.gif\/td\n;
echo tdnbsp;/td\n;
echo tdUp one level to $PreviousFolder/td\n;
echo /tr\n;

echo trtdnbsp;/td/tr\n;
}
?
tr
td align=left valign=topimg
src=/graphics/icons/folder_open.png/td
tdnbsp;/td
td align=left?php echo $CurrentFolder; ?/td
/tr

?php

$LastFolder = $Subdirectories[ count( $Subdirectories
) - 1 ];
$LastFile = $SimpleFiles[ count( $SimpleFiles ) - 1 ];

foreach ( $Subdirectories as $Subdir ) {
echo tr\n;
if ( ( $Subdir == $LastFolder )  ( $LastFile 

Re: [PHP] Explorer-like drill down interface

2002-09-25 Thread Mike Dunlop

I would recommend using javascript for the expanding/contracting list 
stuff and I don't know of any vulnerablilities in MySQL Server...

  - Mike D





I have two questions:

1. I would like to build a php page that contains a Windows 
explorer-like drill down mechanism, where clicking the '+' beside an 
item will expand the sub-items below (which can also have a '+' or 
'-' on the left) and clicking the '-' will collapse the item. Is 
there any existing code for that or hints how I can do it?

2. I have allowed packets through my firewall destined for port 
3306, the mysql server. So I can connect to the server from a remote 
machine. Are there any known security vulnerabilities in the mySQL 
server?

Many thanks,

Rich


-- 
Mike Dunlop
Webmaster
Animation World Network
[EMAIL PROTECTED]
http://www.awn.com
(323) 606-4238 office
(323) 466-6619 fax
6525 Sunset Blvd.  GS10 Los Angeles, CA  90028
USA


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php