Additional fixes in payment/deposit allocations.
[fa-stable.git] / includes / main.inc
index fcb8b99ac5ac4c7ce4ac4fbb3fe073e64bba5a01..016102a58325c28800694fff05a919fd103cd1a5 100644 (file)
@@ -48,13 +48,16 @@ function page($title, $no_menu=false, $is_index=false, $onload="", $js="", $scri
        }
 }
 
-function end_page($no_menu=false, $is_index=false)
+function end_page($no_menu=false, $is_index=false, $hide_back_link=false)
 {
-       global $path_to_root, $Ajax;
-       $hide_menu = $no_menu;
-               div_end();      // _page_body section
-       include($path_to_root . "/includes/page/footer.inc");
-       page_footer($no_menu, $is_index);
+       global $path_to_root;
+
+       if (!$is_index && !$hide_back_link && function_exists('hyperlink_back'))
+               hyperlink_back(true, $no_menu);
+       div_end();      // end of _page_body section
+
+       include($path_to_root . "/includes/page/footer.inc");
+       page_footer($no_menu, $is_index, $hide_back_link);
 }
 
 function flush_dir($path, $wipe = false) 
@@ -259,37 +262,5 @@ function js_compress($sJS)
        }
        return $sJS;
 }
-//-----------------------------------------------------------------------------
-//     Inserts $elements into $array at position $index.
-//     $elements is list of any objects
-//
-function array_insert(&$array, $index, $elements)
-{
-       if (!is_array($elements)) $elements = array($elements);
-
-       $head  = array_splice($array, 0, $index);
-       $array = array_merge($head, $elements, $array);
-}
-
-function array_remove(&$array, $index, $len=1)
-{
-       array_splice($array, $index, $len);
-}
-
-function array_substitute(&$array, $index, $len, $elements)
-{
-       array_splice($array, $index, $len);
-       array_insert($array, $index, $elements);
-}
-
-function array_append(&$array, $elements)
-{
-       foreach($elements as $key => $el) {
-               if(is_int($key))
-                       $array[] = $el;
-               else
-                       $array[$key] = $el;
-       }
-}
 
 ?>
\ No newline at end of file