if (isset($_POST['affiliate_id'])) {
     $Qcheck = smn_db_query('select * from ' . TABLE_AFFILIATE . ' where affiliate_id = "' . $_POST['affiliate_id'] . '"');
     if (!smn_db_num_rows($Qcheck)) {
         $error = true;
         $messageStack->add('account_edit', 'There is no affiliate with the entered id.', '');
     }
 }
 if (smn_session_is_registered('customer_store_id')) {
     $new_store_name = smn_db_prepare_input($_POST['storename']);
     $store_query = smn_db_query("select store_name from " . TABLE_STORE_DESCRIPTION . " WHERE store_name like '" . $new_store_name . "' and store_id != '" . $customer_store_id . "'");
     if (smn_db_num_rows($store_query)) {
         $error = true;
         $messageStack->add('account_edit', ENTRY_STORE_NAME_ERROR, '');
     }
     if (isset($_POST['sp_store_path'])) {
         $sp = new store_path($customer_store_id);
         $data = array('sp_store_path' => $_POST['sp_store_path'], 'sp_store_id' => $customer_store_id, 'sp_store_path_text' => $_POST['sp_store_path_text']);
         $rv = $sp->choose_path($data);
         if ($rv) {
         } else {
             $error = true;
             $messageStack->add('account_edit', $sp->error_message());
         }
     }
     // file uploading class
     $doUpload = false;
     if (!empty($_FILES['store_image']['name']) || !empty($GLOBALS['HTTP_POST_FILES']['store_image']) || !empty($GLOBALS['store_image_name'])) {
         require DIR_WS_CLASSES . 'upload.php';
         if (function_exists('ini_get') && (bool) ini_get('file_uploads') == false) {
             $error = true;
             $messageStack->add('account_edit', WARNING_FILE_UPLOADS_DISABLED, '');
  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.
*/
?>
  <table cellpadding="3" cellspacing="0" border="0">
<?php 
if (class_exists('store_path')) {
    $sp = new store_path($customer_store_id);
    if ($sp->get_store_path() == '') {
        ?>
  
   <tr>
    <td colspan="2"><?php 
        echo $sp->store_path_radio(false);
        ?>
<hr></td>
   </tr>
<?php 
    } else {
        ?>
   <tr>
    <td class="main"><label for="storename"><?php 
        echo ENTRY_STORE_PATH;