[ Index ]

PHP Cross Reference of osCMax 2.0.4

title

Body

[close]

/ -> affiliate_affiliateOrg.php (source)

   1  <?php
   2  /*

   3  $Id: affiliate_affiliateOrg.php 14 2006-07-28 17:42:07Z user $

   4  

   5    OSC-Affiliate

   6  

   7    Contribution based on:

   8  

   9    osCMax Power E-Commerce

  10    http://oscdox.com

  11  

  12    Copyright 2006 osCMax

  13  

  14    Released under the GNU General Public License

  15  */
  16  
  17    require ('includes/application_top.php');
  18  
  19    if (isset($HTTP_GET_VARS['action']) && ($HTTP_GET_VARS['action'] == 'process')) {
  20      $affiliate_username = tep_db_prepare_input($HTTP_POST_VARS['affiliate_username']);
  21      $affiliate_password = tep_db_prepare_input($HTTP_POST_VARS['affiliate_password']);
  22  
  23  // Check if username exists

  24      $check_affiliate_query = tep_db_query("select affiliate_id, affiliate_firstname, affiliate_password, affiliate_email_address from " . TABLE_AFFILIATE . " where affiliate_email_address = '" . tep_db_input($affiliate_username) . "'");
  25      if (!tep_db_num_rows($check_affiliate_query)) {
  26        $HTTP_GET_VARS['login'] = 'fail';
  27      } else {
  28        $check_affiliate = tep_db_fetch_array($check_affiliate_query);
  29  // Check that password is good

  30        if (!tep_validate_password($affiliate_password, $check_affiliate['affiliate_password'])) {
  31          $HTTP_GET_VARS['login'] = 'fail';
  32        } else {
  33          $affiliate_id = $check_affiliate['affiliate_id'];
  34          tep_session_register('affiliate_id');
  35  
  36          $date_now = date('Ymd');
  37  
  38          tep_db_query("update " . TABLE_AFFILIATE . " set affiliate_date_of_last_logon = now(), affiliate_number_of_logons = affiliate_number_of_logons + 1 where affiliate_id = '" . $affiliate_id . "'");
  39  
  40          tep_redirect(tep_href_link(FILENAME_AFFILIATE_SUMMARY,'','SSL'));
  41        }
  42      }
  43    }
  44  
  45    require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_AFFILIATE);
  46  
  47    $breadcrumb->add(NAVBAR_TITLE, tep_href_link(FILENAME_AFFILIATE, '', 'SSL'));
  48  ?>
  49  <!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">
  50  <html <?php echo HTML_PARAMS; ?>>
  51  <head>
  52  <meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>">
  53  <title><?php echo TITLE; ?></title>
  54  <base href="<?php echo (($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG; ?>">
  55  <link rel="stylesheet" type="text/css" href="stylesheet.css">
  56  </head>
  57  <body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0">
  58  <!-- header //-->
  59  <?php require (DIR_WS_INCLUDES . 'header.php'); ?>
  60  <!-- header_eof //-->
  61  
  62  <!-- body //-->
  63  <table border="0" width="100%" cellspacing="3" cellpadding="3">
  64    <tr>
  65      <td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2">
  66  <!-- left_navigation //-->
  67  <?php require (DIR_WS_INCLUDES . 'column_left.php'); ?>
  68  <!-- left_navigation_eof //-->
  69      </table></td>
  70  <!-- body_text //-->
  71      <td width="100%" valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="0">
  72        <tr>
  73          <td><table border="0" width="100%" cellspacing="0" cellpadding="0">
  74            <tr>
  75              <td class="pageHeading"><?php echo HEADING_TITLE; ?></td>
  76              <td rowspan="2" class="pageHeading" align="right"><?php echo tep_image(DIR_WS_IMAGES . 'table_background_login.gif', HEADING_TITLE, HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT); ?></td>
  77            </tr>
  78          </table></td>
  79        </tr>
  80        <tr>
  81          <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
  82        </tr>
  83  <?php
  84    if (isset($HTTP_GET_VARS['login']) && ($HTTP_GET_VARS['login'] == 'fail')) {
  85      $info_message = TEXT_LOGIN_ERROR;
  86    }
  87  
  88    if (isset($info_message)) {
  89  ?>
  90        <tr>
  91          <td class="smallText"><?php echo $info_message; ?></td>
  92        </tr>
  93        <tr>
  94          <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
  95        </tr>
  96  <?php
  97    }
  98  ?>
  99        <tr>
 100          <td><?php echo tep_draw_form('login', tep_href_link(FILENAME_AFFILIATE, 'action=process', 'SSL')); ?><table border="0" width="100%" cellspacing="0" cellpadding="2">
 101            <tr>
 102              <td class="main" width="50%" valign="top"><b><?php echo HEADING_NEW_AFFILIATE; ?></b></td>
 103              <td class="main" width="50%" valign="top"><b><?php echo HEADING_RETURNING_AFFILIATE; ?></b></td>
 104            </tr>
 105            <tr>
 106              <td width="50%" height="100%" valign="top"><table border="0" width="100%" height="100%" cellspacing="0" cellpadding="1" class="infoBox">
 107                <tr>
 108                  <td><table border="0" width="100%" height="100%" cellspacing="0" cellpadding="2" class="infoBoxContents">
 109                    <tr>
 110                      <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
 111                    </tr>
 112                    <tr>
 113                      <td class="main" valign="top"><?php echo TEXT_NEW_AFFILIATE . '<br><br>' . TEXT_NEW_AFFILIATE_INTRODUCTION; ?></td>
 114                    </tr>
 115                    <tr>
 116                      <td class="smallText" colspan="2"><?php echo '<a  href="' . tep_href_link(FILENAME_AFFILIATE_TERMS, '', 'SSL') . '">' . TEXT_NEW_AFFILIATE_TERMS . '</a>'; ?></td>
 117                    </tr>
 118                    <tr>
 119                      <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
 120                    </tr>
 121                  </table></td>
 122                </tr>
 123              </table></td>
 124              <td width="50%" height="100%" valign="top"><table border="0" width="100%" height="100%" cellspacing="0" cellpadding="1" class="infoBox">
 125                <tr>
 126                  <td><table border="0" width="100%" height="100%" cellspacing="0" cellpadding="2" class="infoBoxContents">
 127                    <tr>
 128                      <td colspan="2"><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
 129                    </tr>
 130                    <tr>
 131                      <td class="main" colspan="2"><?php echo TEXT_RETURNING_AFFILIATE; ?></td>
 132                    </tr>
 133                    <tr>
 134                      <td colspan="2"><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
 135                    </tr>
 136                    <tr>
 137                      <td class="main"><b><?php echo TEXT_AFFILIATE_ID; ?></b></td>
 138                      <td class="main"><?php echo tep_draw_input_field('affiliate_username'); ?></td>
 139                    </tr>
 140                    <tr>
 141                      <td class="main"><b><?php echo TEXT_AFFILIATE_PASSWORD; ?></b></td>
 142                      <td class="main"><?php echo tep_draw_password_field('affiliate_password'); ?></td>
 143                    </tr>
 144                    <tr>
 145                      <td colspan="2"><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
 146                    </tr>
 147                    <tr>
 148                      <td class="smallText" colspan="2"><?php echo '<a href="' . tep_href_link(FILENAME_AFFILIATE_PASSWORD_FORGOTTEN, '', 'SSL') . '">' . TEXT_AFFILIATE_PASSWORD_FORGOTTEN . '</a>'; ?></td>
 149                    </tr>
 150                    <tr>
 151                      <td colspan="2"><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
 152                    </tr>
 153                  </table></td>
 154                </tr>
 155              </table></td>
 156            </tr>
 157            <tr>
 158              <td width="50%" align="right" valign="top"><?php echo '<a href="' . tep_href_link(FILENAME_AFFILIATE_SIGNUP, '', 'SSL') . '">' . tep_image_button('button_continue.gif', IMAGE_BUTTON_CONTINUE) . '</a>'; ?></td>
 159              <td width="50%" align="right" valign="top"><?php echo tep_image_submit('button_login.gif', IMAGE_BUTTON_LOGIN); ?></td>
 160            </tr>
 161          </table></form></td>
 162        </tr>
 163      </table></td>
 164  <!-- body_text_eof //-->
 165      <td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2">
 166  <!-- right_navigation //-->
 167  <?php require (DIR_WS_INCLUDES . 'column_right.php'); ?>
 168  <!-- right_navigation_eof //-->
 169      </table></td>
 170    </tr>
 171  </table>
 172  <!-- body_eof //-->
 173  
 174  <!-- footer //-->
 175  <?php require (DIR_WS_INCLUDES . 'footer.php'); ?>
 176  <!-- footer_eof //-->
 177  <br>
 178  </body>
 179  </html>
 180  <?php require (DIR_WS_INCLUDES . 'application_bottom.php'); ?>


Generated: Fri Jan 1 13:43:16 2010 Cross-referenced by PHPXref 0.7