Ejemplo n.º 1
0
                             }
                             db_free_result($attr_results);
                             echo "\n</table>";
                         }
                     }
                 }
                 db_free_result($addr_results);
             }
             if (is_valid_opendb_mailer() && strlen($user_r['email_addr']) > 0 && is_user_granted_permission(PERM_SEND_EMAIL) && is_user_permitted_to_receive_email($user_r['user_id'])) {
                 $url = 'email.php?' . get_url_string(array('op' => 'send_to_uid', 'uid' => $user_r['user_id'], 'inc_menu' => 'N', 'subject' => ifempty($HTTP_VARS['subject'], get_opendb_lang_var('no_subject'))));
                 $footer_links_r[] = array(url => $url, target => 'popup(640,480)', text => get_opendb_lang_var('send_email'));
             }
             if (is_user_granted_permission(PERM_VIEW_LISTINGS) && $user_r['active_ind'] == 'Y') {
                 $footer_links_r[] = array(url => "listings.php?owner_id=" . $user_r['user_id'], text => get_opendb_lang_var('list_user_items'));
             }
             if (is_user_granted_permission(PERM_ADMIN_USER_LISTING) && is_opendb_session_var('user_listing_url_vars')) {
                 $footer_links_r[] = array(url => "user_listing.php?" . get_url_string(get_opendb_session_var('user_listing_url_vars')), text => get_opendb_lang_var('back_to_user_listing'));
             }
             echo format_footer_links($footer_links_r);
         } else {
             $message = get_opendb_lang_var('user_not_found', array('user_id' => $user_r['user_id']));
             echo _theme_header($message);
             echo "<p class=\"error\">" . $message . "</p>";
             echo _theme_footer();
         }
     } else {
         opendb_not_authorised_page(PERM_VIEW_USER_PROFILE, $HTTP_VARS);
     }
 } else {
     // invalid login, so login instead.
     redirect_login($PHP_SELF, $HTTP_VARS);
Ejemplo n.º 2
0
     $page_title = get_opendb_lang_var('item_reserve_list');
     if (is_numeric($listingObject->getItemsPerPage())) {
         $listingObject->setTotalItems(fetch_my_basket_item_cnt(get_opendb_session_var('user_id')));
         if ($listingObject->getTotalItemCount() > 0) {
             $checkbox_column = TRUE;
             $result = fetch_my_basket_item_rs(get_opendb_session_var('user_id'), $listingObject->getCurrentOrderBy(), $listingObject->getCurrentSortOrder(), $listingObject->getStartIndex(), $listingObject->getItemsPerPage());
         }
     } else {
         $result = fetch_my_basket_item_rs(get_opendb_session_var('user_id'), $listingObject->getCurrentOrderBy(), $listingObject->getCurrentSortOrder());
     }
     // Set it explicitly here.
     $HTTP_VARS['op'] = 'my_reserve_basket';
     if (is_exists_item_instance($HTTP_VARS['item_id'], $HTTP_VARS['instance_no'])) {
         $footer_links_r[] = array(url => "item_display.php?item_id=" . $HTTP_VARS['item_id'] . "&instance_no=" . $HTTP_VARS['instance_no'], text => get_opendb_lang_var('back_to_item'));
     }
     if (is_opendb_session_var('listing_url_vars')) {
         $footer_links_r[] = array(url => "listings.php?" . get_url_string(get_opendb_session_var('listing_url_vars')), text => get_opendb_lang_var('back_to_listing'));
     }
 } else {
     if ($HTTP_VARS['op'] == 'admin_history') {
         echo _theme_header(get_opendb_lang_var('borrower_history'));
         echo "<h2>" . get_opendb_lang_var('borrower_history') . "</h2>";
         echo "\n<form action=\"{$PHP_SELF}\" method=\"GET\">";
         echo "\n<input type=\"hidden\" name=\"op\" value=\"my_history\">";
         echo "\n<table>";
         $results = fetch_user_rs(PERM_USER_BORROWER, ROLE_PERMISSIONS_INCLUDE, INCLUDE_CURRENT_USER, EXCLUDE_DEACTIVATED_USER, "fullname", "ASC");
         echo format_field(get_opendb_lang_var('borrower'), custom_select('uid', $results, '%fullname% (%user_id%)', 1, get_opendb_session_var('user_id'), 'user_id'));
         echo "</table>";
         echo "<input type=\"submit\" class=\"submit\" value=\"" . get_opendb_lang_var('submit') . "\">";
         echo "</form>";
         echo _theme_footer();