Quick Search:

View

Revision:

Diff

Diff from 6 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 /*
hpdl
6
3   $Id: account.php 6 2005-02-23 15:07:33Z hpdl $
hpdl
1
4
5   osCommerce, Open Source E-Commerce Solutions
6   http://www.oscommerce.com
7
hpdl
6
8   Copyright (c) 2005 osCommerce
hpdl
1
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
hpdl
6
98     $Qorders = $osC_Database->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 = :customers_id and o.orders_id = ot.orders_id and ot.class = :class and o.orders_status = s.orders_status_id and s.language_id = :language_id order by orders_id desc limit 3');
99     $Qorders->bindTable(':table_orders', TABLE_ORDERS);
100     $Qorders->bindTable(':table_orders_total', TABLE_ORDERS_TOTAL);
101     $Qorders->bindTable(':table_orders_status', TABLE_ORDERS_STATUS);
102     $Qorders->bindInt(':customers_id', $osC_Customer->id);
103     $Qorders->bindValue(':class', 'ot_total');
104     $Qorders->bindInt(':language_id', $osC_Session->value('languages_id'));
105     $Qorders->execute();
106
107     while ($Qorders->next()) {
108       if (tep_not_null($Qorders->value('delivery_name'))) {
109         $order_name = $Qorders->value('delivery_name');
110         $order_country = $Qorders->value('delivery_country');
hpdl
1
111       } else {
hpdl
6
112         $order_name = $Qorders->value('billing_name');
113         $order_country = $Qorders->value('billing_country');
hpdl
1
114       }
115 ?>
hpdl
6
116                   <tr class="moduleRow" onMouseOver="rowOverEffect(this)" onMouseOut="rowOutEffect(this)" onClick="document.location.href='<?php echo tep_href_link(FILENAME_ACCOUNT_HISTORY_INFO, 'order_id=' . $Qorders->valueInt('orders_id'), 'SSL'); ?>'">
117                     <td class="main" width="80"><?php echo tep_date_short($Qorders->value('date_purchased')); ?></td>
118                     <td class="main"><?php echo '#' . $Qorders->valueInt('orders_id'); ?></td>
hpdl
1
119                     <td class="main"><?php echo tep_output_string_protected($order_name) . ', ' . $order_country; ?></td>
hpdl
6
120                     <td class="main"><?php echo $Qorders->value('orders_status_name'); ?></td>
121                     <td class="main" align="right"><?php echo $Qorders->value('order_total'); ?></td>
122                     <td class="main" align="right"><?php echo '<a href="' . tep_href_link(FILENAME_ACCOUNT_HISTORY_INFO, 'order_id=' . $Qorders->valueInt('orders_id'), 'SSL') . '">' . tep_image_button('small_view.gif', SMALL_IMAGE_BUTTON_VIEW) . '</a>'; ?></td>
hpdl
1
123                   </tr>
124 <?php
125     }
126 ?>
127                 </table></td>
128                 <td><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
129               </tr>
130             </table></td>
131           </tr>
132         </table></td>
133       </tr>
134       <tr>
135         <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
136       </tr>
137 <?php
138   }
139 ?>
140       <tr>
141         <td><table border="0" width="100%" cellspacing="0" cellpadding="2">
142           <tr>
143             <td class="main"><b><?php echo MY_ACCOUNT_TITLE; ?></b></td>
144           </tr>
145         </table></td>
146       </tr>
147       <tr>
148         <td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox">
149           <tr class="infoBoxContents">
150             <td><table border="0" width="100%" cellspacing="0" cellpadding="2">
151               <tr>
152                 <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
153                 <td width="60"><?php echo tep_image(DIR_WS_IMAGES . 'account_personal.gif'); ?></td>
154                 <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
155                 <td><table border="0" width="100%" cellspacing="0" cellpadding="2">
156                   <tr>
157                     <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>
158                   </tr>
159                   <tr>
160                     <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>
161                   </tr>
162                   <tr>
163                     <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>
164                   </tr>
165                 </table></td>
166                 <td width="10" align="right"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
167               </tr>
168             </table></td>
169           </tr>
170         </table></td>
171       </tr>
172       <tr>
173         <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
174       </tr>
175       <tr>
176         <td><table border="0" width="100%" cellspacing="0" cellpadding="2">
177           <tr>
178             <td class="main"><b><?php echo MY_ORDERS_TITLE; ?></b></td>
179           </tr>
180         </table></td>
181       </tr>
182       <tr>
183         <td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox">
184           <tr class="infoBoxContents">
185             <td><table border="0" width="100%" cellspacing="0" cellpadding="2">
186               <tr>
187                 <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
188                 <td width="60"><?php echo tep_image(DIR_WS_IMAGES . 'account_orders.gif'); ?></td>
189                 <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
190                 <td><table border="0" width="100%" cellspacing="0" cellpadding="2">
191                   <tr>
192                     <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>
193                   </tr>
194                 </table></td>
195                 <td width="10" align="right"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
196               </tr>
197             </table></td>
198           </tr>
199         </table></td>
200       </tr>
201       <tr>
202         <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
203       </tr>
204       <tr>
205         <td><table border="0" width="100%" cellspacing="0" cellpadding="2">
206           <tr>
207             <td class="main"><b><?php echo EMAIL_NOTIFICATIONS_TITLE; ?></b></td>
208           </tr>
209         </table></td>
210       </tr>
211       <tr>
212         <td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox">
213           <tr class="infoBoxContents">
214             <td><table border="0" width="100%" cellspacing="0" cellpadding="2">
215               <tr>
216                 <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
217                 <td width="60"><?php echo tep_image(DIR_WS_IMAGES . 'account_notifications.gif'); ?></td>
218                 <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
219                 <td><table border="0" width="100%" cellspacing="0" cellpadding="2">
220                   <tr>
221                     <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>
222                   </tr>
223                   <tr>
224                     <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>
225                   </tr>
226                 </table></td>
227                 <td width="10" align="right"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
228               </tr>
229             </table></td>
230           </tr>
231         </table></td>
232       </tr>
233     </table></td>
234 <!-- body_text_eof //-->
235     <td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2">
236 <!-- right_navigation //-->
237 <?php require(DIR_WS_INCLUDES . 'column_right.php'); ?>
238 <!-- right_navigation_eof //-->
239     </table></td>
240   </tr>
241 </table>
242 <!-- body_eof //-->
243
244 <!-- footer //-->
245 <?php require(DIR_WS_INCLUDES . 'footer.php'); ?>
246 <!-- footer_eof //-->
247 <br>
248 </body>
249 </html>
250 <?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?>