Пример #1
0
     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, '');
         }
         $customersStore->set_store_logo('store_image');