[TEP-COMMIT] [CVS catalog] introduce the new main account.php page that will handle account related
hpdl-OfajU3CKLf1/[email protected] 29 Mar 2005 23:25:39 -0000
| Newsgroups | gmane.comp.web.oscommerce.cvs |
|---|---|
| Message-ID | <[email protected]> |
<html>
<head>
<style><!--
body {background-color:#ffffff;}
.file {border:1px solid #eeeeee;margin-top:1em;margin-bottom:1em;}
.pathname {font-family:monospace; float:right;}
.fileheader {margin-bottom:.5em;}
.diff {margin:0;}
.tasklist {padding:4px;border:1px dashed #000000;margin-top:1em;}
.tasklist ul {margin-top:0;margin-bottom:0;}
tr.alt {background-color:#eeeeee}
#added {background-color:#ddffdd;}
#addedchars {background-color:#99ff99;font-weight:bolder;}
tr.alt #added {background-color:#ccf7cc;}
#removed {background-color:#ffdddd;}
#removedchars {background-color:#ff9999;font-weight:bolder;}
tr.alt #removed {background-color:#f7cccc;}
#info {color:#888888;}
#context {background-color:#eeeeee;}
td {padding-left:.3em;padding-right:.3em;}
tr.head {border-bottom-width:1px;border-bottom-style:solid;}
tr.head td {padding:0;padding-top:.2em;}
.task {background-color:#ffff00;}
.comment {padding:4px;border:1px dashed #000000;background-color:#ffffdd}
.error {color:red;}
hr {border-width:0px;height:2px;background:black;}
--></style>
</head>
<body>
<table cellspacing="0" cellpadding="0" border="0" rules="cols">
<tr class="head"><td colspan="4">Commit in <b><tt>catalog/catalog</tt></b><span id="info"> on MAIN</span></td></tr>
<tr><td><tt><a href="#file1">account.php</a></tt></td><td align="right" id="added">+18</td><td align="right" id="removed">-223</td><td nowrap="nowrap" align="center"><a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/account.php?rev=1.63&content-type=text/vnd.viewcvs-markup">1.63</a> <a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/account.php.diff?r1=1.63&r2=1.64">-></a> <a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/account.php?rev=1.64&content-type=text/vnd.viewcvs-markup">1.64</a></td></tr>
</table>
<pre class="comment">
introduce the new main account.php page that will handle account related
pages through the GET scope
for example, account.php?address_book will show the address book page
</pre>
<hr /><a name="file1" /><div class="file">
<span class="pathname"><a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog">catalog</a>/<a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog">catalog</a><br /></span>
<div class="fileheader"><big><b>account.php</b></big> <small id="info"><a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/account.php?rev=1.63&content-type=text/vnd.viewcvs-markup">1.63</a> <a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/account.php.diff?r1=1.63&r2=1.64">-></a> <a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/account.php?rev=1.64&content-type=text/vnd.viewcvs-markup">1.64</a></small></div>
<pre class="diff"><small id="info">diff -u -r1.63 -r1.64
--- account.php 2005/02/23 15:24:24 1.63
+++ account.php 2005/03/29 23:25:37 1.64
@@ -20,231 +20,26 @@
</small></pre><pre class="diff" id="context">
require(DIR_WS_LANGUAGES . $osC_Session->value('language') . '/' . FILENAME_ACCOUNT);
</pre><pre class="diff" id="removed">- $breadcrumb->add(NAVBAR_TITLE, tep_href_link(FILENAME_ACCOUNT, '', 'SSL'));
-?>
-<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">
-<html <?php echo HTML_PARAMS; ?>>
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>">
-<title><?php echo TITLE; ?></title>
-<base href="<?php echo (($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG; ?>">
-<link rel="stylesheet" type="text/css" href="stylesheet.css">
-<script language="javascript"><!--
-function rowOverEffect(object) {
- if (object.className == 'moduleRow') object.className = 'moduleRowOver';
-}
-
-function rowOutEffect(object) {
- if (object.className == 'moduleRowOver') object.className = 'moduleRow';
-}
-//--></script>
-</head>
-<body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0">
-<!-- header //-->
-<?php require(DIR_WS_INCLUDES . 'header.php'); ?>
-<!-- header_eof //-->
-
-<!-- body //-->
-<table border="0" width="100%" cellspacing="3" cellpadding="3">
- <tr>
- <td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2">
-<!-- left_navigation //-->
-<?php require(DIR_WS_INCLUDES . 'column_left.php'); ?>
-<!-- left_navigation_eof //-->
- </table></td>
-<!-- body_text //-->
- <td width="100%" valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="0">
- <tr>
- <td><table border="0" width="100%" cellspacing="0" cellpadding="0">
- <tr>
- <td class="pageHeading"><?php echo HEADING_TITLE; ?></td>
- <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>
- </tr>
- </table></td>
- </tr>
- <tr>
- <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
- </tr>
-<?php
- if ($messageStack->size('account') > 0) {
-?>
- <tr>
- <td><?php echo $messageStack->output('account'); ?></td>
- </tr>
- <tr>
- <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
- </tr>
-<?php
</pre><pre class="diff" id="added">+ if ($osC_Services->isStarted('breadcrumb')) {
+ $breadcrumb->add(NAVBAR_TITLE_MY_ACCOUNT, tep_href_link(FILENAME_ACCOUNT, '', 'SSL'));
</pre><pre class="diff" id="context"> }
</pre><pre class="diff" id="removed">- if (tep_count_customer_orders() > 0) {
-?>
- <tr>
- <td><table border="0" cellspacing="0" cellpadding="2">
- <tr>
- <td class="main"><b><?php echo OVERVIEW_TITLE; ?></b></td>
- <td class="main"><?php echo '<a href="' . tep_href_link(FILENAME_ACCOUNT_HISTORY, '', 'SSL') . '"><u>' . OVERVIEW_SHOW_ALL_ORDERS . '</u></a>'; ?></td>
- </tr>
- </table></td>
- </tr>
- <tr>
- <td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox">
- <tr class="infoBoxContents">
- <td><table border="0" width="100%" cellspacing="0" cellpadding="2">
- <tr>
- <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>
- <td><table border="0" width="100%" cellspacing="0" cellpadding="2">
-<?php
- $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');
- $Qorders->bindTable(':table_orders', TABLE_ORDERS);
- $Qorders->bindTable(':table_orders_total', TABLE_ORDERS_TOTAL);
- $Qorders->bindTable(':table_orders_status', TABLE_ORDERS_STATUS);
- $Qorders->bindInt(':customers_id', $osC_Customer->id);
- $Qorders->bindValue(':class', 'ot_total');
- $Qorders->bindInt(':language_id', $osC_Session->value('languages_id'));
- $Qorders->execute();
-
- while ($Qorders->next()) {
- if (tep_not_null($Qorders->value('delivery_name'))) {
- $order_name = $Qorders->value('delivery_name');
- $order_country = $Qorders->value('delivery_country');
- } else {
- $order_name = $Qorders->value('billing_name');
- $order_country = $Qorders->value('billing_country');
- }
-?>
- <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'); ?>'">
- <td class="main" width="80"><?php echo tep_date_short($Qorders->value('date_purchased')); ?></td>
- <td class="main"><?php echo '#' . $Qorders->valueInt('orders_id'); ?></td>
- <td class="main"><?php echo tep_output_string_protected($order_name) . ', ' . $order_country; ?></td>
- <td class="main"><?php echo $Qorders->value('orders_status_name'); ?></td>
- <td class="main" align="right"><?php echo $Qorders->value('order_total'); ?></td>
- <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>
- </tr>
-<?php
</pre><pre class="diff" id="added">+ $page_contents = 'account.php';
+
+ if (empty($_GET) === false) {
+ $_account_module = tep_sanitize_string(basename(key(array_slice($_GET, 0, 1))));
+
+ if (file_exists('includes/modules/account/' . $_account_module . '.php')) {
+ include('includes/modules/account/' . $_account_module . '.php');
+
+ $_account_module_name = 'osC_Account_' . ucfirst($_account_module);
+ $osC_Account_Module = new $_account_module_name();
+
+ $page_contents = $osC_Account_Module->getPageContentsFile();
</pre><pre class="diff" id="context"> }
</pre><pre class="diff" id="removed">-?>
- </table></td>
- <td><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
- </tr>
- </table></td>
- </tr>
- </table></td>
- </tr>
- <tr>
- <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
- </tr>
-<?php
</pre><pre class="diff" id="context"> }
</pre><pre class="diff" id="added">+
+ require('templates/default.php');
+
+ require('includes/application_bottom.php');
</pre><pre class="diff" id="context"> ?>
</pre><pre class="diff" id="removed">- <tr>
- <td><table border="0" width="100%" cellspacing="0" cellpadding="2">
- <tr>
- <td class="main"><b><?php echo MY_ACCOUNT_TITLE; ?></b></td>
- </tr>
- </table></td>
- </tr>
- <tr>
- <td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox">
- <tr class="infoBoxContents">
- <td><table border="0" width="100%" cellspacing="0" cellpadding="2">
- <tr>
- <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
- <td width="60"><?php echo tep_image(DIR_WS_IMAGES . 'account_personal.gif'); ?></td>
- <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
- <td><table border="0" width="100%" cellspacing="0" cellpadding="2">
- <tr>
- <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>
- </tr>
- <tr>
- <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>
- </tr>
- <tr>
- <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>
- </tr>
- </table></td>
- <td width="10" align="right"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
- </tr>
- </table></td>
- </tr>
- </table></td>
- </tr>
- <tr>
- <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
- </tr>
- <tr>
- <td><table border="0" width="100%" cellspacing="0" cellpadding="2">
- <tr>
- <td class="main"><b><?php echo MY_ORDERS_TITLE; ?></b></td>
- </tr>
- </table></td>
- </tr>
- <tr>
- <td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox">
- <tr class="infoBoxContents">
- <td><table border="0" width="100%" cellspacing="0" cellpadding="2">
- <tr>
- <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
- <td width="60"><?php echo tep_image(DIR_WS_IMAGES . 'account_orders.gif'); ?></td>
- <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
- <td><table border="0" width="100%" cellspacing="0" cellpadding="2">
- <tr>
- <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>
- </tr>
- </table></td>
- <td width="10" align="right"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
- </tr>
- </table></td>
- </tr>
- </table></td>
- </tr>
- <tr>
- <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
- </tr>
- <tr>
- <td><table border="0" width="100%" cellspacing="0" cellpadding="2">
- <tr>
- <td class="main"><b><?php echo EMAIL_NOTIFICATIONS_TITLE; ?></b></td>
- </tr>
- </table></td>
- </tr>
- <tr>
- <td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox">
- <tr class="infoBoxContents">
- <td><table border="0" width="100%" cellspacing="0" cellpadding="2">
- <tr>
- <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
- <td width="60"><?php echo tep_image(DIR_WS_IMAGES . 'account_notifications.gif'); ?></td>
- <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
- <td><table border="0" width="100%" cellspacing="0" cellpadding="2">
- <tr>
- <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>
- </tr>
- <tr>
- <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>
- </tr>
- </table></td>
- <td width="10" align="right"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
- </tr>
- </table></td>
- </tr>
- </table></td>
- </tr>
- </table></td>
-<!-- body_text_eof //-->
- <td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2">
-<!-- right_navigation //-->
-<?php require(DIR_WS_INCLUDES . 'column_right.php'); ?>
-<!-- right_navigation_eof //-->
- </table></td>
- </tr>
-</table>
-<!-- body_eof //-->
-
-<!-- footer //-->
-<?php require(DIR_WS_INCLUDES . 'footer.php'); ?>
-<!-- footer_eof //-->
-<br>
-</body>
-</html>
-<?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?>
</pre></div>
<center><small><a href="http://www.badgers-in-foil.co.uk/projects/cvsspam/" title="commit -> email">CVSspam</a> 0.2.9</small></center>
</body></html>
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click