The links and images used in the dock.php header.php include files use relative
paths.  This poses a problem if someone were to include them from a file in a
subdirectory.  In particular, the links and images used by the include files
would be assumed to be in the same subdirectory.

This patch fixes this issue by using absolute paths instead.
---
 dock.php   | 19 ++++++++++---------
 header.php |  2 +-
 2 files changed, 11 insertions(+), 10 deletions(-)

diff --git a/dock.php b/dock.php
index 7f361e3..c0119f1 100644
--- a/dock.php
+++ b/dock.php
@@ -1,36 +1,37 @@
+<?php $root = "http://www.windowmaker.org/";;?>
   <div id="dock">
     <table width="64" height="500" border="0" cellpadding="0" cellspacing="0">
       <tr>
-        <td><a href="home.php"><img src="homewmaker.png" alt="Home" width="60" 
height="81"></a></td>
+        <td><a href="<?php echo $root;?>home.php"><img src="<?php echo 
$root;?>homewmaker.png" alt="Home" width="60" height="81"></a></td>
       </tr>
 
       <tr>
-        <td><a href="news.php"><img src=
-        "news.png" alt="News" width="60" height="81"></a></td>
+        <td><a href="<?php echo $root;?>news.php"><img src=
+        "<?php echo $root;?>news.png" alt="News" width="60" 
height="81"></a></td>
       </tr>
 
       <tr>
-        <td><a href="docs.php"><img src=
-        "docs.png" alt="Documentation" width="60" height="81"></a></td>
+        <td><a href="<?php echo $root;?>docs.php"><img src=
+        "<?php echo $root;?>docs.png" alt="Documentation" width="60" 
height="81"></a></td>
       </tr>
 
       <tr>
-        <td><a href="lists.php"><img src="mailing_list.png" alt="Mailing 
Lists" width="60" height=
+        <td><a href="<?php echo $root;?>lists.php"><img src="<?php echo 
$root;?>mailing_list.png" alt="Mailing Lists" width="60" height=
         "81"></a></td>
       </tr>
 
       <tr>
-        <td><a href="dev.php"><img src="development.png" alt="Development" 
width="60" height=
+        <td><a href="<?php echo $root;?>dev.php"><img src="<?php echo 
$root;?>development.png" alt="Development" width="60" height=
         "81"></a></td>
       </tr>
 
       <tr>
-        <td><a href="themes.php"><img src="themes.png" alt="Themes" width="60" 
height=
+        <td><a href="<?php echo $root;?>themes.php"><img src="<?php echo 
$root;?>themes.png" alt="Themes" width="60" height=
         "81"></a></td>
       </tr>
 
       <tr>
-        <td><a href="links.php"><img src="links.png" alt="Links" width="60" 
height=
+        <td><a href="<?php echo $root;?>links.php"><img src="<?php echo 
$root;?>links.png" alt="Links" width="60" height=
         "81"></a></td>
       </tr>
     </table>
diff --git a/header.php b/header.php
index f5e586e..65ac354 100644
--- a/header.php
+++ b/header.php
@@ -2,7 +2,7 @@
     <table width="100%">
       <tr>
         <td width="100%">
-          <a href="index.php"><img src="header.png" style="min-width:700px" 
width="95%" alt="title bar"></a>
+          <a href="<?php echo $root;?>"><img src="<?php echo 
$root;?>header.png" style="min-width:700px" width="95%" alt="title bar"></a>
       </tr>
       <tr>
         <td width="100%">
-- 
1.9.1


-- 
To unsubscribe, send mail to [email protected].

Reply via email to