Fixed many issues in output HTML code according to HTML 4.01 Transitional format.
[fa-stable.git] / includes / page / footer.inc
index bb2759c6d7fc6ab93933a9a689735a9ee1f366c5..5804c3341069bf5a06802880b2cf37a31a4c720d 100644 (file)
@@ -1,44 +1,46 @@
 <?php
-
-include_once($path_to_root . "/includes/date_functions.inc");
-
+/**********************************************************************
+    Copyright (C) FrontAccounting, LLC.
+       Released under the terms of the GNU General Public License, GPL, 
+       as published by the Free Software Foundation, either version 3 
+       of the License, or (at your option) any later version.
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
+    See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
+***********************************************************************/
 function page_footer($no_menu=false, $is_index=false)
 {
-       global $local_path_to_root, $version, $allow_demo_mode;
-       global $app_title, $power_url, $power_by;
-
-       if (function_exists('hyperlink_back'))
-               hyperlink_back();
-       if ($no_menu == false) 
-       {
-       if ($is_index)
-               echo "<table class=bottomBar>\n";
-       else
-               echo "<table class=bottomBar2>\n";
-       echo "<tr>";
-       if (isset($_SESSION['wa_current_user']))
-               echo "<td class=bottomBarCell>" . Today() . " | " . Now() . "</td>\n";
-       echo "</tr></table>\n";
+       global $path_to_root, $js_lib, $Validate, $Editors, $Ajax, $sql_queries;
+
+       $page_header_args = func_get_args();
+       hook_invoke_all('pre_footer', $page_header_args);
+
+       include_once($path_to_root."/themes/".user_theme()."/renderer.php");
+       $rend = new renderer();
+       $rend->menu_footer($no_menu, $is_index);
+
+       $edits = "editors = ".$Ajax->php2js($Editors).";";
+       $Ajax->addScript('editors', $edits);
+
+       echo "<script type='text/javascript'>
+               _focus = '" . get_post('_focus') . "';
+               _validate = " . $Ajax->php2js($Validate).";
+               var $edits
+       </script>";
+
+       add_user_js_data();
+       echo "\n<script type=\"text/javascript\"><!--\n";
+
+       foreach($js_lib as $text)
+               echo $text;
+       echo "\n--></script>\n";
+
+       if ($sql_queries) {
+               div_start('footer_debug');
+                echo "<div class='note_msg'>$sql_queries</div>";
+               div_end();
        }
-       echo "</td></tr></table></td>\n";
-    echo "</table>\n";
-    if ($no_menu == false) 
-    {
-       echo "<table align='center' id='footer'>\n";
-       echo "<tr>\n";
-       echo "<td align='center' class='footer'><a target='_blank' href='$power_url'><font color='#ffffff'>$app_title $version - " . _("Theme:") . " " . user_theme() . "</font></a></td>\n";
-       echo "</tr>\n";
-       echo "<tr>\n";
-       echo "<td align='center' class='footer'><a target='_blank' href='$power_url'><font color='#ffff00'>$power_by</font></a></td>\n";
-       echo "</tr>\n";
-       if ($allow_demo_mode==true)
-       {
-               echo "<tr>\n";
-            //echo "<td><br><div align='center'><a href='http://sourceforge.net'><img src='http://sourceforge.net/sflogo.php?group_id=89967&amp;type=5' alt='SourceForge.net Logo' width='210' height='62' border='0' align='middle' /></a></div></td>\n";
-               echo "</tr>\n";
-       }
-       echo "</table><br><br>\n";
-    }
     echo "</body></html>\n";
 }