Quick Search:

Mode

Context

Displaying 3 lines of context. None | Less | More | Full

Other Diffs

Ignore

Blank Lines Whitespace:

Diff

179
 
180
 
180
 
account.php
_> 3838       return false;
  3939     }
  4040 
<>  41+    function saveEntry($data) {
   42+      global $osC_Database, $osC_Customer;
   43+
   44+      $Qcustomer = $osC_Database->query('update :table_customers set customers_gender = :customers_gender, customers_firstname = :customers_firstname, customers_lastname = :customers_lastname, customers_email_address = :customers_email_address, customers_dob = :customers_dob where customers_id = :customers_id');
   45+      $Qcustomer->bindTable(':table_customers', TABLE_CUSTOMERS);
   46+      $Qcustomer->bindValue(':customers_gender', ((ACCOUNT_GENDER > -1) && isset($data['gender']) && (($data['gender'] == 'm') || ($data['gender'] == 'f'))) ? $data['gender'] : '');
   47+      $Qcustomer->bindValue(':customers_firstname', $data['firstname']);
   48+      $Qcustomer->bindValue(':customers_lastname', $data['lastname']);
   49+      $Qcustomer->bindValue(':customers_email_address', $data['email_address']);
   50+      $Qcustomer->bindValue(':customers_dob', (ACCOUNT_DATE_OF_BIRTH > -1) ? date('Ymd', $data['dob']) : '');
   51+      $Qcustomer->bindInt(':customers_id', $osC_Customer->id);
   52+      $Qcustomer->execute();
   53+
   54+      if ($Qcustomer->affectedRows() === 1) {
   55+        $Qupdate = $osC_Database->query('update :table_customers_info set customers_info_date_account_last_modified = now() where customers_info_id = :customers_info_id');
   56+        $Qupdate->bindTable(':table_customers_info', TABLE_CUSTOMERS_INFO);
   57+        $Qupdate->bindInt(':customers_info_id', $osC_Customer->id);
   58+        $Qupdate->execute();
   59+
   60+        return true;
   61+      }
   62+
   63+      return false;
   64+    }
   65+
4166     function checkEntry($email_address) {
  4267       global $osC_Database;
  4368 
     
 !
75100 
  76101       return false;
  77102     }
<>  103+
   104+    function checkDuplicateEntry($email_address) {
   105+      global $osC_Database, $osC_Customer;
   106+
   107+      $Qcheck = $osC_Database->query('select customers_id from :table_customers where customers_email_address = :customers_email_address and customers_id != :customers_id limit 1');
   108+      $Qcheck->bindTable(':table_customers', TABLE_CUSTOMERS);
   109+      $Qcheck->bindValue(':customers_email_address', $email_address);
   110+      $Qcheck->bindInt(':customers_id', $osC_Customer->id);
   111+      $Qcheck->execute();
   112+
   113+      if ($Qcheck->numberOfRows() === 1) {
   114+        return true;
   115+      }
   116+
   117+      return false;
   118+    }
<_ 78119   }
  79120 ?>