Quick Search:

View

Revision:

Diff

Diff from 1 to:

Annotations

Annotate by Age | Author | Mixed | None
/fisheye/browse/osCommerce/tags/oscommerce-3.0a3/account.php

Annotated File View

hpdl
1
1 <?php
2 /*
3   $Id: account.php,v 1.62 2003/11/17 16:27:59 hpdl Exp $
4
5   osCommerce, Open Source E-Commerce Solutions
6   http://www.oscommerce.com
7
8   Copyright (c) 2003 osCommerce
9
10   Released under the GNU General Public License
11 */
12
13   require('includes/application_top.php');
14
15   if ($osC_Customer->isLoggedOn() == false) {
16     $navigation->set_snapshot();
17
18     tep_redirect(tep_href_link(FILENAME_LOGIN, '', 'SSL'));
19   }
20
21   require(DIR_WS_LANGUAGES . $osC_Session->value('language') . '/' . FILENAME_ACCOUNT);
22
23   $breadcrumb->add(NAVBAR_TITLE, tep_href_link(FILENAME_ACCOUNT, '', 'SSL'));
24 ?>
25 <!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">
26 <html <?php echo HTML_PARAMS; ?>>
27 <head>
28 <meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>">
29 <title><?php echo TITLE; ?></title>
30 <base href="<?php echo (($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG; ?>">
31 <link rel="stylesheet" type="text/css" href="stylesheet.css">
32 <script language="javascript"><!--
33 function rowOverEffect(object) {
34   if (object.className == 'moduleRow') object.className = 'moduleRowOver';
35 }
36
37 function rowOutEffect(object) {
38   if (object.className == 'moduleRowOver') object.className = 'moduleRow';
39 }
40 //--></script>
41 </head>
42 <body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0">
43 <!-- header //-->
44 <?php require(DIR_WS_INCLUDES . 'header.php'); ?>
45 <!-- header_eof //-->
46
47 <!-- body //-->
48 <table border="0" width="100%" cellspacing="3" cellpadding="3">
49   <tr>
50     <td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2">
51 <!-- left_navigation //-->
52 <?php require(DIR_WS_INCLUDES . 'column_left.php'); ?>
53 <!-- left_navigation_eof //-->
54     </table></td>
55 <!-- body_text //-->
56     <td width="100%" valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="0">
57       <tr>
58         <td><table border="0" width="100%" cellspacing="0" cellpadding="0">
59           <tr>
60             <td class="pageHeading"><?php echo HEADING_TITLE; ?></td>
61             <td class="pageHeading" align="right"><?php echo tep_image(DIR_WS_IMAGES . 'table_background_account.gif', HEADING_TITLE, HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT); ?></td>
62           </tr>
63         </table></td>
64       </tr>
65       <tr>
66         <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
67       </tr>
68 <?php
69   if ($messageStack->size('account') > 0) {
70 ?>
71       <tr>
72         <td><?php echo $messageStack->output('account'); ?></td>
73       </tr>
74       <tr>
75         <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
76       </tr>
77 <?php
78   }
79
80   if (tep_count_customer_orders() > 0) {
81 ?>
82       <tr>
83         <td><table border="0" cellspacing="0" cellpadding="2">
84           <tr>
85             <td class="main"><b><?php echo OVERVIEW_TITLE; ?></b></td>
86             <td class="main"><?php echo '<a href="' . tep_href_link(FILENAME_ACCOUNT_HISTORY, '', 'SSL') . '"><u>' . OVERVIEW_SHOW_ALL_ORDERS . '</u></a>'; ?></td>
87           </tr>
88         </table></td>
89       </tr>
90       <tr>
91         <td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox">
92           <tr class="infoBoxContents">
93             <td><table border="0" width="100%" cellspacing="0" cellpadding="2">
94               <tr>
95                 <td class="main" align="center" valign="top" width="130"><?php echo '<b>' . OVERVIEW_PREVIOUS_ORDERS . '</b><br>' . tep_image(DIR_WS_IMAGES . 'arrow_south_east.gif'); ?></td>
96                 <td><table border="0" width="100%" cellspacing="0" cellpadding="2">
97 <?php
98     $orders_query = tep_db_query("select o.orders_id, o.date_purchased, o.delivery_name, o.delivery_country, o.billing_name, o.billing_country, ot.text as order_total, s.orders_status_name from " . TABLE_ORDERS . " o, " . TABLE_ORDERS_TOTAL . " ot, " . TABLE_ORDERS_STATUS . " s where o.customers_id = '" . (int)$osC_Customer->id . "' and o.orders_id = ot.orders_id and ot.class = 'ot_total' and o.orders_status = s.orders_status_id and s.language_id = '" . (int)$osC_Session->value('languages_id') . "' order by orders_id desc limit 3");
99     while ($orders = tep_db_fetch_array($orders_query)) {
100       if (tep_not_null($orders['delivery_name'])) {
101         $order_name = $orders['delivery_name'];
102         $order_country = $orders['delivery_country'];
103       } else {
104         $order_name = $orders['billing_name'];
105         $order_country = $orders['billing_country'];
106       }
107 ?>
108                   <tr class="moduleRow" onMouseOver="rowOverEffect(this)" onMouseOut="rowOutEffect(this)" onClick="document.location.href='<?php echo tep_href_link(FILENAME_ACCOUNT_HISTORY_INFO, 'order_id=' . $orders['orders_id'], 'SSL'); ?>'">
109                     <td class="main" width="80"><?php echo tep_date_short($orders['date_purchased']); ?></td>
110                     <td class="main"><?php echo '#' . $orders['orders_id']; ?></td>
111                     <td class="main"><?php echo tep_output_string_protected($order_name) . ', ' . $order_country; ?></td>
112                     <td class="main"><?php echo $orders['orders_status_name']; ?></td>
113                     <td class="main" align="right"><?php echo $orders['order_total']; ?></td>
114                     <td class="main" align="right"><?php echo '<a href="' . tep_href_link(FILENAME_ACCOUNT_HISTORY_INFO, 'order_id=' . $orders['orders_id'], 'SSL') . '">' . tep_image_button('small_view.gif', SMALL_IMAGE_BUTTON_VIEW) . '</a>'; ?></td>
115                   </tr>
116 <?php
117     }
118 ?>
119                 </table></td>
120                 <td><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
121               </tr>
122             </table></td>
123           </tr>
124         </table></td>
125       </tr>
126       <tr>
127         <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
128       </tr>
129 <?php
130   }
131 ?>
132       <tr>
133         <td><table border="0" width="100%" cellspacing="0" cellpadding="2">
134           <tr>
135             <td class="main"><b><?php echo MY_ACCOUNT_TITLE; ?></b></td>
136           </tr>
137         </table></td>
138       </tr>
139       <tr>
140         <td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox">
141           <tr class="infoBoxContents">
142             <td><table border="0" width="100%" cellspacing="0" cellpadding="2">
143               <tr>
144                 <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
145                 <td width="60"><?php echo tep_image(DIR_WS_IMAGES . 'account_personal.gif'); ?></td>
146                 <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
147                 <td><table border="0" width="100%" cellspacing="0" cellpadding="2">
148                   <tr>
149                     <td class="main"><?php echo tep_image(DIR_WS_IMAGES . 'arrow_green.gif') . ' <a href="' . tep_href_link(FILENAME_ACCOUNT_EDIT, '', 'SSL') . '">' . MY_ACCOUNT_INFORMATION . '</a>'; ?></td>
150                   </tr>
151                   <tr>
152                     <td class="main"><?php echo tep_image(DIR_WS_IMAGES . 'arrow_green.gif') . ' <a href="' . tep_href_link(FILENAME_ADDRESS_BOOK, '', 'SSL') . '">' . MY_ACCOUNT_ADDRESS_BOOK . '</a>'; ?></td>
153                   </tr>
154                   <tr>
155                     <td class="main"><?php echo tep_image(DIR_WS_IMAGES . 'arrow_green.gif') . ' <a href="' . tep_href_link(FILENAME_ACCOUNT_PASSWORD, '', 'SSL') . '">' . MY_ACCOUNT_PASSWORD . '</a>'; ?></td>
156                   </tr>
157                 </table></td>
158                 <td width="10" align="right"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
159               </tr>
160             </table></td>
161           </tr>
162         </table></td>
163       </tr>
164       <tr>
165         <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
166       </tr>
167       <tr>
168         <td><table border="0" width="100%" cellspacing="0" cellpadding="2">
169           <tr>
170             <td class="main"><b><?php echo MY_ORDERS_TITLE; ?></b></td>
171           </tr>
172         </table></td>
173       </tr>
174       <tr>
175         <td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox">
176           <tr class="infoBoxContents">
177             <td><table border="0" width="100%" cellspacing="0" cellpadding="2">
178               <tr>
179                 <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
180                 <td width="60"><?php echo tep_image(DIR_WS_IMAGES . 'account_orders.gif'); ?></td>
181                 <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
182                 <td><table border="0" width="100%" cellspacing="0" cellpadding="2">
183                   <tr>
184                     <td class="main"><?php echo tep_image(DIR_WS_IMAGES . 'arrow_green.gif') . ' <a href="' . tep_href_link(FILENAME_ACCOUNT_HISTORY, '', 'SSL') . '">' . MY_ORDERS_VIEW . '</a>'; ?></td>
185                   </tr>
186                 </table></td>
187                 <td width="10" align="right"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
188               </tr>
189             </table></td>
190           </tr>
191         </table></td>
192       </tr>
193       <tr>
194         <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
195       </tr>
196       <tr>
197         <td><table border="0" width="100%" cellspacing="0" cellpadding="2">
198           <tr>
199             <td class="main"><b><?php echo EMAIL_NOTIFICATIONS_TITLE; ?></b></td>
200           </tr>
201         </table></td>
202       </tr>
203       <tr>
204         <td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox">
205           <tr class="infoBoxContents">
206             <td><table border="0" width="100%" cellspacing="0" cellpadding="2">
207               <tr>
208                 <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
209                 <td width="60"><?php echo tep_image(DIR_WS_IMAGES . 'account_notifications.gif'); ?></td>
210                 <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
211                 <td><table border="0" width="100%" cellspacing="0" cellpadding="2">
212                   <tr>
213                     <td class="main"><?php echo tep_image(DIR_WS_IMAGES . 'arrow_green.gif') . ' <a href="' . tep_href_link(FILENAME_ACCOUNT_NEWSLETTERS, '', 'SSL') . '">' . EMAIL_NOTIFICATIONS_NEWSLETTERS . '</a>'; ?></td>
214                   </tr>
215                   <tr>
216                     <td class="main"><?php echo tep_image(DIR_WS_IMAGES . 'arrow_green.gif') . ' <a href="' . tep_href_link(FILENAME_ACCOUNT_NOTIFICATIONS, '', 'SSL') . '">' . EMAIL_NOTIFICATIONS_PRODUCTS . '</a>'; ?></td>
217                   </tr>
218                 </table></td>
219                 <td width="10" align="right"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
220               </tr>
221             </table></td>
222           </tr>
223         </table></td>
224       </tr>
225     </table></td>
226 <!-- body_text_eof //-->
227     <td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2">
228 <!-- right_navigation //-->
229 <?php require(DIR_WS_INCLUDES . 'column_right.php'); ?>
230 <!-- right_navigation_eof //-->
231     </table></td>
232   </tr>
233 </table>
234 <!-- body_eof //-->
235
236 <!-- footer //-->
237 <?php require(DIR_WS_INCLUDES . 'footer.php'); ?>
238 <!-- footer_eof //-->
239 <br>
240 </body>
241 </html>
242 <?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?>