$customerInfo->set_dob($dob); $customerInfo->set_street_address($street_address); $customerInfo->set_postcode($postcode); $customerInfo->set_city($city); $customerInfo->set_country_id($customer_country_id); $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')))) . '" }
//others required includes only here require_once 'inc/session.php'; require_once 'inc/functions/time.php'; require_once 'inc/classes/call.php'; require_once 'inc/classes/customer.php'; require_once 'inc/classes/web.php'; require_once 'inc/classes/subject.php'; require_once 'inc/classes/country.php'; if (isset($_POST['create'])) { $call = new call(); $customer = new customer(); $duration = $_POST['minutes'] * 60 + $_POST['seconds']; if ($customer->exists($_POST['mail'], false)) { $call->create($_SESSION['users']['id'], $_POST['type'], $_POST['web'], $_POST['subject'], $duration, $_POST['comments'], $customer->MailToId($_POST['mail'])); } else { $customer->create($_POST['name'], $_POST['mail'], $_POST['city'], $_POST['country'], $_POST['phone']); $call->create($_SESSION['users']['id'], $_POST['type'], $_POST['web'], $_POST['subject'], $duration, $_POST['comments'], $customer->MailToId($_POST['mail'])); } $msg = $call->printNiceLog(false); } $html['title'] = 'Create'; $html['head'] = '<script src="themes/' . THEME . '/js/jquery.js" type="text/javascript"></script>'; //theme header include_once 'themes/' . THEME . '/header.php'; ?> <div class="title"> <h2>Create</h2> <p><small>Here you can create new calls.</small></p> </div> <div class="entry"> <fieldset>
$profile_edit->set_gender($_POST['customers_gender']); $profile_edit->set_dob($_POST['customers_dob']); $profile_edit->set_street_address($_POST['street_address']); $profile_edit->set_postcode($_POST['postcode']); $profile_edit->set_city($_POST['city']); $profile_edit->set_country_id($_POST['country']); $profile_edit->set_company($_POST['company']); if ($zone_id > 0) { $L_state = smn_get_zone_name($_POST['country'], $zone_id, ''); $profile_edit->set_zone_id($zone_id); $profile_edit->set_state($L_state); } else { $profile_edit->set_zone_id('0'); $profile_edit->set_state($_POST['state']); } $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();
$new_customer->set_lastname($lastname); $new_customer->set_email_address($email_address); $new_customer->set_telephone($telephone); $new_customer->set_fax($fax); $new_customer->set_newsletter($newsletter); $new_customer->set_password($password); $new_customer->set_gender($gender); $new_customer->set_dob($dob); $new_customer->set_street_address($street_address); $new_customer->set_postcode($postcode); $new_customer->set_city($city); $new_customer->set_country_id($customer_country_id); $new_customer->set_company($company); $new_customer->set_zone_id($customer_zone_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);
$customer_info->set_city($city); $customer_info->set_country_id($country); $customer_info->set_company($company); if ($_GET['action'] == 'process') { $customer_info->set_password($password); } if ($zone_id > 0) { $customer_info->set_zone_id($zone_id); $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();