Enlightenment CVS committal

Author  : leviathan
Project : web
Module  : www

Dir     : web/www/site


Modified Files:
        site.php 


Log Message:
display all the subsections of subsections of subsections of ...

===================================================================
RCS file: /cvs/e/web/www/site/site.php,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -3 -r1.10 -r1.11
--- site.php    23 Apr 2007 07:58:24 -0000      1.10
+++ site.php    24 Apr 2007 10:19:57 -0000      1.11
@@ -148,15 +148,17 @@
       global $page;
       global $lang;
       $item = 0;
-      $p = $page;
-      if ( strpos($page, "/") ) {
-          $p = substr($page, 0, strpos($page, "/"));
-      }
+      $arr = explode("/", $page);
+      $p = "";
+      for ($i=0; $i<count($arr); $i++) {
+          if ($p != "") $p .= "/";
+           $p .= $arr[$i];
 
       if (file_exists("p/$p/subs")) {
          $handle = fopen("p/$p/subs", "r");
          if ($handle) {
              echo("<ul class='navul'>\n");
+             $item = 0;
              while (!feof($handle)) {
                  $fl = fgets($handle, 4096);
                  $fl = str_replace("\n", "", $fl);
@@ -192,6 +194,7 @@
              }
              echo("</ul><hr>");
          }
+      }
       }
   }
 ?>     



-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to