Quick Search:

View

Revision:

Diff

Diff from 724 to:

Annotations

Annotate by Age | Author | Mixed | None
/fisheye/browse/osCommerce/tags/oscommerce-2.2ms2-20060817/catalog/account.php

Annotated File View

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