Exemplo n.º 1
0
        $customerInfo->set_company($company);
        $customerInfo->set_zone_id($customer_zone_id);
        $customerInfo->set_state($state);
        $customerInfo->set_telephone($telephone);
        $customerInfo->set_tollfree($tollfree);
        $customerInfo->set_fax($fax);
        $customerInfo->set_newsletter($newsletter);
        if (isset($_POST['affiliate_id'])) {
            $customerInfo->set_affiliate_id($_POST['affiliate_id']);
        }
        $customerInfo->create($customer_id);
        if (smn_session_is_registered('customer_store_id')) {
            $customerInfo->update_store_admin();
            $customersStore->set_store_name($new_store_name);
            $customersStore->set_store_category($_POST['store_catagory']);
            $customersStore->set_store_description($_POST['store_description']);
            $customersStore->update_store_info();
            $customersStore->put_store_category();
        }
        echo '{success:true}';
    } else {
        echo '{
              success: false,
              errors: {
                   message: "' . addslashes(str_replace("\n", '', nl2br($messageStack->outputPlain('account_edit')))) . '"
              }
             }';
    }
    exit;
}
$account_query = smn_db_query("select c.*, ab.* from " . TABLE_CUSTOMERS . " c,  " . TABLE_ADDRESS_BOOK . " ab  where ab.customers_id = '" . (int) $customer_id . "' and c.customers_id = '" . (int) $customer_id . "' and ab.address_book_id = c.customers_default_address_id");
     $new_customer->set_state($state);
     $customer_id = $new_customer->create();
     $customer_default_address_id = $new_customer->get_default_address();
     smn_session_register('customer_id');
     smn_session_register('customer_first_name');
     smn_session_register('customer_default_address_id');
     smn_session_register('customer_country_id');
     smn_session_register('customer_zone_id');
 }
 //CREATE STORE IN THE DATABASE.....
 // systemsmanager begin - Dec 5, 2005
 $new_store = new store();
 $new_store->set_store_type($new_store_type);
 $new_store->set_customers_id($customer_id);
 $new_store->set_store_name($new_store_name);
 $new_store->set_store_description($store_description);
 $new_store->set_store_category($store_catagory);
 $new_store->set_store_logo('store_image');
 $customer_store_id = $new_store->create_store();
 smn_session_register('customer_store_id');
 $error_text = $new_store->put_logo_image();
 if ($error_text != '') {
     smn_session_register('error_text');
 }
 $new_store->put_store_description();
 $new_store->put_store_category();
 $new_store->put_store_admin();
 $new_store->put_store_data();
 $new_store->put_store_cost();
 $new_store->put_store_products();
 if (ALLOW_STORE_SITE_TEXT == 'true') {
Exemplo n.º 3
0
     $customer_info->set_state('');
 } else {
     $customer_info->set_zone_id('0');
     $customer_info->set_state($state);
 }
 //ADD THE STORE OWNER DATA ....
 if ($_GET['action'] == 'update') {
     $customers_id = $customer_info->create($customers_id);
 } else {
     $customers_id = $customer_info->create();
 }
 $store_info->set_store_type($new_store_type);
 $store_info->set_customers_id($customers_id);
 $store_info->set_customers_data($customers_id);
 $store_info->set_store_name($new_store_name);
 $store_info->set_store_description($store_description);
 $store_info->set_store_category($store_catagory);
 $store_info->set_store_logo('store_image');
 if ($_GET['action'] == 'process') {
     $customer_store_id = $store_info->create_store();
     $store_info->put_store_description();
     $store_info->put_store_category();
     $store_info->put_store_admin();
     $store_info->put_store_data();
     $store_info->put_store_cost();
     $store_info->put_store_products();
     if (ALLOW_STORE_SITE_TEXT == 'true') {
         $store_info->put_store_language('english');
     }
     $store_info->send_store_email($gender);
     $error_text = $store_info->put_logo_image('update');
        }
        $customer_id = $profile_edit->create($customer_id);
        if ($store->is_store_owner($customer_id)) {
            // file uploading class
            require DIR_WS_CLASSES . 'upload.php';
            if (function_exists('ini_get') && (bool) ini_get('file_uploads') == false) {
                $messageStack->add(WARNING_FILE_UPLOADS_DISABLED, 'warning');
            }
            $store_query = smn_db_query("select store_name from " . TABLE_STORE_DESCRIPTION . " WHERE store_name like '" . $_POST['store_edit_name'] . "'");
            if (smn_db_num_rows($store_query)) {
                $error = true;
                $messageStack->add('account_edit', ENTRY_STORE_NAME_ERROR);
            } else {
                $store_edit->set_store_name($_POST['store_edit_name']);
            }
            $store_edit->set_store_description($_POST['store_description']);
            $store_edit->update_store_info();
            $store_edit->set_store_logo('store_image');
            $error_text = $store_edit->put_logo_image('update');
            if ($error_text != '') {
                smn_session_register('error_text');
            }
        }
        $customer_first_name = $firstname;
        $messageStack->add_session('account_edit', SUCCESS_ACCOUNT_UPDATED, 'success');
        smn_redirect(smn_href_link(FILENAME_ACCOUNT_EDIT, 'ID=' . $store_id, 'NONSSL'));
    }
}
$account_query = smn_db_query("select c.*, ab.* from " . TABLE_CUSTOMERS . " c,  " . TABLE_ADDRESS_BOOK . " ab  where ab.customers_id = '" . (int) $customer_id . "' and c.customers_id = '" . (int) $customer_id . "' and ab.address_book_id = c.customers_default_address_id");
$account = smn_db_fetch_array($account_query);
$breadcrumb->add(NAVBAR_TITLE_1, smn_href_link(FILENAME_ACCOUNT, 'ID=' . $store_id, 'NONSSL'));
Exemplo n.º 5
0
<?php

/*
  Copyright (c) 2002 - 2005 SystemsManager.Net

  SystemsManager Technologies
  oscMall System Version 4
  http://www.systemsmanager.net
  
  Portions Copyright (c) 2002 osCommerce
  
  This source file is subject to version 2.0 of the GPL license,   
  that is bundled with this package in the file LICENSE. If you
  did not receive a copy of the oscMall System license and are unable 
  to obtain it through the world-wide-web, please send a note to    
  license@systemsmanager.net so we can mail you a copy immediately.
*/
global $page_name;
if (!smn_session_is_registered('customer_id')) {
    $navigation->set_snapshot();
    smn_redirect(smn_href_link(FILENAME_LOGIN, '', 'NONSSL'));
}
$store = new store(0, $customer_id);
if (isset($_POST['action']) && $_POST['action'] == 'process') {
    $store->set_store_description(smn_db_prepare_input($_POST['store_description']));
    $store->update();
    $messageStack->add_session('account', SUCCESS_STORE_UPDATED, 'success');
    smn_redirect(smn_href_link(FILENAME_ACCOUNT, '', 'NONSSL'));
}
$breadcrumb->add(NAVBAR_TITLE_1, smn_href_link(FILENAME_ACCOUNT, '', 'NONSSL'));
$breadcrumb->add(NAVBAR_TITLE_2, smn_href_link(FILENAME_ACCOUNT_PASSWORD, '', 'NONSSL'));