A whole php-written tree directory structure

Source: Internet
Author: User
Tree directory looks novel, and most of the internet is the combination of JavaScript and PHP, I this one is written with the full use of PHP4, with the session function, please see more suggestions. (I passed the test under WIN98/PWS/PHP4)
?
2001/02/23
Zhanghexun
Tree-Type Directory
Session_Start (); Start a session
if (!session_is_registered ("$office _action")) {
$office _action=0;
Session_register ("$office _action");//Register a session
}
if (!session_is_registered ("$pho _action")) {
$pho _action=0;
Session_register ("$pho _action");
}
if (!session_is_registered ("$web _action")) {
$web _action=0;
Session_register ("$web _action");
}
$office =array (' wps ', ' office2000 ', ' Peking founder '); Office Star Project
$pho =array (' Photoshop ', ' 3D MAX ', ' fish ', ' firworks ');
$web =array (' php ', ' asp ', ' JSP ', ' html ', ' JavaScript ', ' Perl ');
?>
<HTML><HEAD><TITLE> Zhang Hexing Tree-type directory </TITLE>
<meta content= "text/html; charset=gb2312 "http-equiv=content-type><BODY>
<table border=0 width= "100%" bgcolor= #8cc9ec cellpadding=1 cellspacing=1>
<TBODY>
<TR>
&LT;TD width=180 bgcolor= #8cc9ec >
<TABLE>
<tr><td><font class=font6> Learning Center </FONT></TD></TR>
<tr><td> <a href=<?
if ($acte ==1000) {
$office _action= 1-$office _action;
}
Print "" $php _self?acte=1000&office_action= $office _action "";
?>> Office Star </a><br>
<?if ($office _action==1) {
Print "<talbe> <tbody> <tr>";
for ($i =0; $i <count ($office); $i + +) {
Print "<td>&nbsp&nbsp&nbsp|-<a href=" $php _self?acte=. (1005+ $i *5). " > $office [$i]</a></td></tr>];
}
print "</tbody></table>";

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.