this file shows you the content of the directory its lying in. just copy this file in the directory and look at it. it DOESN'T shows subdirectories, but the query, which remove the sub-dirs, is marked so you can easily remove it. I've used HTML, CSS and PHP. ps: excuse my bad english please, i'll try to get better. thx.
By : juna
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!--
written by juna reuther - http://snowcristals.net. hope you enjoy it. its none of my business if you leave the comments or not. do as you like :)
-->
<HTML>
<HEAD>
<TITLE>
index
</TITLE>
</HEAD>
<BODY>
<center>
<style type="text/css">
A:active {COLOR: #FFFFFF; TEXT-DECORATION: none}
A:hover { COLOR: #FFFFFF; TEXT-DECORATION: underline}
A:link {COLOR:#000000; TEXT-DECORATION: none}
A:visited {COLOR: #C0C0C0; TEXT-DECORATION: none}
.trone {
background-color: #E9E9E9;
font-size: 9pt;
text-indent: 20px;
}
.trtwo{
background-color: #FFFFFF;
font-size: 9pt;
text-indent: 20px;
}
BODY { TEXT-DECORATION: none;
font-family:verdana;
font-size: 9pt;
text-indent: 20px;
}
</style>
<br><br>
<table border=0>
<tr class="trtwo">
<td><center><b>file</b></center></td>
<td><center><b>size</b></center></td>
<td><center><b>last modified</b></center></td>
</tr>
<?
// shows the correct size & size-label
function size($file) {
$size_label = array("Byte", "KB", "MB", "GB", "TB");
$size=filesize($file);
for ($c=0;$size>1024; $c++) {
$size/=1024;
}
$size=round($size,1);
return("$size ".$size_label[$c]);
}
$trbg = "1"; // which <TR> - background
// reading the content and...
$mydir = dir("./");
while ($file=$mydir->read()){
$kind = filetype($file);
if ($kind != "dir"){ // ATTENTION! if you want this file to show subdirectories, remove this query
//... showing the content:
//<tr> - backgroundcolor
echo "<tr>";
if ($trbg=="1"){
echo "<tr class=\"trone\">";
$trbg = "2";
}
else if ($trbg=="2"){
echo "<tr class = \"trtwo\">";
$trbg = "1";
}
//<td> and filename...
echo "<td width=300><a href=\"$file\">".$file."</a></td>";
//...filesize...
echo "<td width=100>".size($file)." </td>";
//... last change...
$change = filemtime($file);
echo "<td width=200>".date("j. - M. - Y; H:i:s",$change)."</td>";
}
}
$mydir->close();
?>
</tr>
</table>
<br><br>
</center>
</BODY>
</HTML>
| DISCLAIMER: The content provided in this article is not warranted or guaranteed by Developer Shed, Inc. The content provided is intended for entertainment and/or educational purposes in order to introduce to the reader key ideas, concepts, and/or product reviews. As such it is incumbent upon the reader to employ real-world tactics for security and implementation of best practices. We are not liable for any negative consequences that may result from implementing any information covered in our articles or tutorials. If this is a hardware review, it is not recommended to open and/or modify your hardware. |
More GUI Code Articles
More By Codewalkers
developerWorks - FREE Tools! |
You probably have thousands of lines of COBOL code loaded with business intelligence and being used to run your business, along with an army of developers maintaining these applications. Learn how to prepare your applications and developers so you can keep that competitive edge and move to a service-oriented architecture with the IBM Rational Enterprise Modernization solutions. Replay is available for 9 months. FREE! Go There Now!
|
|
|
|
Visit IBM developerWorks to download the latest trial version of IBM Data Studio V1.1 at no cost. IBM Data Studio is a comprehensive data management solution that helps you effectively design, develop, deploy and manage your data, databases, and database applications throughout the data management life cycle utilizing a consistent and integrated user interface. Unlike other client-side data management solutions that focus on only one aspect of the application lifecycle or database administration, Data Studio complements the Rational Software Delivery platform, providing unparalleled flexibility for a heterogeneous data server environment across platforms. FREE! Go There Now!
|
|
|
|
Visit IBM developerWorks to download a free trial of the Rational Host Access Transformation Services (HATS) Toolkit. The HATS toolkit provides a set of plug-ins for the IBM Rational Software Delivery Platform to help you easily extend your legacy applications. HATS makes your 3270 and 5250 applications available as HTML through the most popular Web browsers, while converting your host screens to a Web look and feel and it also enables you to develop new Web, portal, and rich-client applications. FREE! Go There Now!
|
|
|
|
Discover how Rational tools and best practices for testing can make your job easier. The new Rational Testing eKits provide you with valuable resources – including demos, webcasts, tutorials, and articles – that help you address your specific testing needs across the software lifecycle. Five new eKits are available covering the topics of Requirements and Test Management, Functional Testing, Performance Testing, Code Quality and Embedded Systems, and SOA and Web Services Testing. FREE! Go There Now!
|
|
|
|
This whitepaper provides areas to consider when evaluating any software configuration management solution. It addresses how the IBM solutions (Rational ClearCase and Rational ClearQuest) meet the needs and requirements of both project leaders and developers to provide successful Software Change and Configuration Management. FREE! Go There Now!
|
|
|
|
Get a free trial download of the latest version of IBM Rational Tester for SOA Quality V7.0.1, a functional and regression testing tool that enables the creation, comprehension, modification and execution of testing GUI-less Web services. FREE! Go There Now!
|
|
|
|
Visit IBM developerWorks to try the IBM SOA Sandbox for connectivity. The SOA Sandbox for connectivity provides a trial environment with the tooling and components to help you explore how to effectively connect your infrastructure and integrate all of the people, processes and information in your company. Use the hosted sandbox to explore SOA techniques that streamline connecting existing IT assets together, as well as learn how to connect them to new business logic. FREE! Go There Now!
|
|
|
|
Attend this launch webcast with Scott Hebner, Vice President of IBM Rational Marketing and Strategy, where he will overview Rational’s new offerings and programs to help customers accelerate software innovation on System z. He will discuss how these solutions help organizations extend their core business processes toward modern architectures such as SOA and web technologies to deliver business improvements that stand the test of time. FREE! Go There Now!
|
|
|
|
In this webcast, IBM Rational will discuss the importance of Web application security and will share techniques and best practices to introduce application security testing into current QA processes including: understanding common security vulnerabilities and techniques to integrate security testing with defect tracking and remediation systems in an effort to safeguard sensitive online information. FREE! Go There Now!
|
|
|
|
User communities play an important role in communication and collaboration around products, solutions and other areas of special interest to members. Successful communities are able to provide the right mix of content and services to deliver a value proposition that resonates with each audience. Join Tom Inman, VP of Marketing for Information and Platform Solutions as he introduces the new LeverageINFORMATION community. During this webcast, learn about the value provided by the community and how customers and partners derive value from the community in addressing their own technical and business challenges. FREE! Go There Now!
|
|
|
|
All FREE IBM® developerWorks Tools! |