3 require_once('session.php');
5 $skin_info = $freeside->skin_info( array(
6 'session_id' => $_COOKIE['session_id'],
12 <style type="text/css">
24 'payment.php Payments',
25 'payment_cc.php Credit Card Payment',
26 'payment_ach.php Electronic check payment',
27 'payment_paypal.php PayPal payment',
28 'payment_webpay.php Webpay payment',
32 foreach ($menu_array AS $menu_item) {
33 if ( preg_match('/^\s*$/', $menu_item) ) {
34 print_menu($submenu, $current_menu, $menu_disable);
37 $submenu[] = $menu_item;
40 print_menu($submenu, $current_menu, $menu_disable);
42 function print_menu($submenu_array, $current_menu, $menu_disable) {
43 if ( count($submenu_array) == 0 ) { return; }
47 foreach ($submenu_array AS $submenu_item) {
48 $pieces = preg_split('/\s+/', $submenu_item, 2, PREG_SPLIT_NO_EMPTY);
49 $links[] = $pieces[0];
50 $labels[] = $pieces[1];
53 print_link($links[0], $labels[0], $current_menu, $links);
55 if ( count($links) > 1 ) {
56 if ( in_array( $current_menu, $links ) ) {
57 echo '<img src="images/dropdown_arrow_white.gif">';
59 echo '<img src="images/dropdown_arrow_white.gif" style="display:none;">';
60 echo '<img src="images/dropdown_arrow_grey.gif">';
69 if ( count($links) > 0 ) {
71 foreach ($links AS $link) {
72 $label = array_shift($labels);
73 if ( in_array($label, $menu_disable) == 0) {
74 print_link($link, $label, $current_menu, array($link) );
85 function print_link($link, $label, $current_menu, $search_array) {
86 echo '<li><a href="'. $link. '"';
87 if ( in_array( $current_menu, $search_array ) ) {
88 echo ' class="current_menu"';
97 <div style="clear:both;"></div>
98 <table cellpadding="0" cellspacing="0" border="0" style="min-width:666px">