• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

PHP fn_rm函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中fn_rm函数的典型用法代码示例。如果您正苦于以下问题:PHP fn_rm函数的具体用法?PHP fn_rm怎么用?PHP fn_rm使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了fn_rm函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: generate

 public function generate($force = false)
 {
     $filename = $this->getFileName();
     if (!is_dir(dirname($filename))) {
         fn_mkdir(dirname($filename));
     }
     if ($force) {
         fn_rm($filename);
     }
     if (!file_exists($filename)) {
         fn_set_progress('echo', __('generating_xls'), false);
         $header = $data = array();
         $currencies = Registry::get('currencies');
         $currency = $currencies[CART_SECONDARY_CURRENCY];
         $currency_format = '#' . $currency['thousands_separator'] . '##0.' . str_repeat('0', $currency['decimals']);
         $currency_format = $currency['after'] == 'Y' ? $currency_format . $currency['symbol'] : $currency['symbol'] . $currency_format;
         foreach ($this->selected_fields as $field_id => $field_value) {
             $header[$this->price_schema['fields'][$field_id]['title']] = $field_id == 'price' ? $currency_format : 'string';
         }
         $this->writer->writeSheetHeader($this->sheet, $header);
         $this->render();
         $this->writer->writeToFile($filename);
     }
     return $filename;
 }
开发者ID:ambient-lounge,项目名称:site,代码行数:25,代码来源:Xlsx.php


示例2: actionComplete

 /**
  * Setup complete action
  *
  * @param array $params Request variables
  *
  * @return bool Always true
  */
 public function actionComplete($params = array())
 {
     $validator = new Validator();
     $app = App::instance();
     fn_define('CART_LANGUAGE', $app->getCurrentLangCode());
     fn_define('DESCR_SL', $app->getCurrentLangCode());
     $database = $app->getFromStorage('database_settings');
     if (!empty($database)) {
         $result = $validator->isMysqlSettingsValid($database['host'], $database['name'], $database['user'], $database['password'], $database['table_prefix'], $database['database_backend'], false);
         if ($result) {
             // Delete installer after store was installed.
             fn_rm(Registry::get('config.dir.root') . '/install');
             session_destroy();
             $this->_prepareHttpData();
             Session::init($params);
             $user_data = array('user_id' => 1, 'user_type' => 'A', 'area' => 'A', 'login' => 'admin', 'is_root' => 'Y', 'company_id' => 0);
             $_SESSION['auth'] = fn_fill_auth($user_data, array(), false, 'A');
             if (is_file(Registry::get('config.dir.root') . '/install/index.php')) {
                 $_SESSION['notifications']['installer'] = array('type' => 'W', 'title' => 'warning', 'message' => 'delete_install_folder', 'message_state' => 'S', 'new' => true, 'extra' => '', 'init_message' => true);
             }
             $redirect_url = Registry::get('config.http_location') . '/' . Registry::get('config.admin_index') . '?welcome';
             fn_redirect($redirect_url);
         }
     }
     fn_redirect('install/index.php');
     return true;
 }
开发者ID:heg-arc-ne,项目名称:cscart,代码行数:34,代码来源:SetupController.php


示例3: updateViaFtp

 public function updateViaFtp($content, $settings)
 {
     $this->saveBackup();
     $tmp_file = fn_create_temp_file();
     fn_put_contents($tmp_file, $content);
     $ftp_copy_result = fn_copy_by_ftp($tmp_file, $this->path, $settings);
     fn_rm($tmp_file);
     $status = $ftp_copy_result === true;
     return array($status, $ftp_copy_result);
 }
开发者ID:askzap,项目名称:ultimate,代码行数:10,代码来源:Robots.php


示例4: fn_rus_dellin_uninstall

function fn_rus_dellin_uninstall()
{
    $service_ids = db_get_fields('SELECT service_id FROM ?:shipping_services WHERE module = ?s', 'dellin');
    if (!empty($service_ids)) {
        db_query('DELETE FROM ?:shipping_services WHERE service_id IN (?a)', $service_ids);
        db_query('DELETE FROM ?:shipping_service_descriptions WHERE service_id IN (?a)', $service_ids);
    }
    db_query('DROP TABLE IF EXISTS ?:rus_dellin_cities');
    $file_dir = fn_get_files_dir_path() . "dellin/";
    fn_rm($file_dir);
}
开发者ID:ambient-lounge,项目名称:site,代码行数:11,代码来源:func.php


示例5: fn_settings_actions_addons_seo

/**
 * Check if mod_rewrite is active and clean up templates cache
 */
function fn_settings_actions_addons_seo(&$new_value, $old_value)
{
    if ($new_value == 'A') {
        $result = fn_http_request('GET', Registry::get('config.http_location') . '/catalog.html?version');
        if (strpos($result[0]['RESPONSE'], '200 OK') === false) {
            $new_value = 'D';
            fn_set_notification('W', fn_get_lang_var('warning'), fn_get_lang_var('warning_seo_urls_disabled'));
        }
    }
    fn_rm(DIR_COMPILED . 'customer');
    return true;
}
开发者ID:diedsmiling,项目名称:busenika,代码行数:15,代码来源:actions.post.php


示例6: clear

 static function clear($changed_tables)
 {
     $tags = array();
     foreach ($changed_tables as $table => $flag) {
         if (!empty(self::$_cache_handlers[$table])) {
             $tags = fn_array_merge($tags, array_keys(self::$_cache_handlers[$table]), false);
         }
     }
     foreach ($tags as $tag) {
         fn_rm(DIR_CACHE . $tag, true);
     }
     fn_put_contents(DIR_CACHE . self::$_handlers_name, serialize(self::$_cache_handlers));
     return true;
 }
开发者ID:diedsmiling,项目名称:busenika,代码行数:14,代码来源:class.cache_backend_file.php


示例7: update

 public function update($id, $params)
 {
     $status = Response::STATUS_BAD_REQUEST;
     $data = array();
     $lang_code = $this->safeGet($params, 'lang_code', DEFAULT_LANGUAGE);
     if (isset($params['processor_params']['certificate_filename']) && !$params['processor_params']['certificate_filename']) {
         fn_rm(Registry::get('config.dir.certificates') . $id);
     }
     $payment_id = fn_update_payment($params, $id, $lang_code);
     if ($payment_id) {
         $status = Response::STATUS_OK;
         $data = array('payment_id' => $payment_id);
     }
     return array('status' => $status, 'data' => $data);
 }
开发者ID:OneataBogdan,项目名称:lead_coriolan,代码行数:15,代码来源:Payments.php


示例8: downloadPackage

 /**
  * Downloads upgrade package from the Upgade server
  *
  * @param  array  $schema       Package schema
  * @param  string $package_path Path where the upgrade pack must be saved
  * @return bool   True if upgrade package was successfully downloaded, false otherwise
  */
 public function downloadPackage($schema, $package_path)
 {
     $data = fn_get_contents(Registry::get('config.resources.updates_server') . '/index.php?dispatch=product_updates.get_package&package_id=' . $schema['package_id'] . '&edition=' . PRODUCT_EDITION . '&license_number=' . $this->uc_settings['license_number']);
     if (!empty($data)) {
         fn_put_contents($package_path, $data);
         if (md5_file($package_path) == $schema['md5']) {
             $result = array(true, '');
         } else {
             fn_rm($package_path);
             $result = array(false, __('text_uc_broken_package'));
         }
     } else {
         $result = array(false, __('text_uc_cant_download_package'));
     }
     return $result;
 }
开发者ID:arpad9,项目名称:bygmarket,代码行数:23,代码来源:Connector.php


示例9: rotate

 public function rotate()
 {
     if (file_exists($this->path . $this->filename)) {
         if (empty($this->save_name)) {
             $this->save_name = date('log_commerceml.txt', TIME);
         }
         fn_rename($this->path . $this->filename, $this->path . $this->save_name);
         $logs_list = fn_get_dir_contents($this->path, false, true);
         if (!empty($logs_list) && count($logs_list) > self::MAX_LOGS_FILE) {
             rsort($logs_list);
             list(, $old_logs) = array_chunk($logs_list, self::MAX_LOGS_FILE);
             foreach ($old_logs as $filename) {
                 fn_rm($this->path . $filename);
             }
         }
     }
 }
开发者ID:ambient-lounge,项目名称:site,代码行数:17,代码来源:Logs.php


示例10: downloadPackage

 public function downloadPackage($schema, $package_path)
 {
     if (!empty($schema['download_key'])) {
         $upgrade_path = $this->settings['packages_server'] . $this->settings['addon'] . '/' . $schema['file'];
         $addon_upgrades_dir = Registry::get('config.dir.addons') . $this->settings['addon'] . '/upgrades/';
         $addon_upgrades_path = $addon_upgrades_dir . $schema['file'];
         if (!file_exists($addon_upgrades_path)) {
             fn_mkdir($addon_upgrades_dir);
             $addon_upgrade_data = fn_get_contents($upgrade_path);
             fn_put_contents($addon_upgrades_path, $addon_upgrade_data);
         }
         $result = fn_copy($addon_upgrades_path, $package_path);
         if ($result) {
             fn_rm($addon_upgrades_path);
         }
         //cleanup
         $message = $result ? '' : __('failed') . '-' . $addon_upgrades_path;
         return array($result, $message);
     } else {
         return array(false, __($schema['error_message']));
     }
 }
开发者ID:OneataBogdan,项目名称:lead_coriolan,代码行数:22,代码来源:Connector.php


示例11: generate

 public function generate($force = false)
 {
     $filename = $this->getFileName();
     if (!is_dir(dirname($filename))) {
         fn_mkdir(dirname($filename));
     }
     if ($force) {
         fn_rm($filename);
     }
     // Min column width in percent
     $min_width = array('product' => 50, 'product_code' => 13, 'image' => 10);
     if (!file_exists($filename)) {
         $max_perc = 100;
         $field_count = count($this->selected_fields);
         // First step. Check for the min width.
         $perc = intval($max_perc / $field_count);
         foreach ($this->selected_fields as $field_name => $active) {
             if (isset($min_width[$field_name])) {
                 if ($min_width[$field_name] > $perc) {
                     $max_perc -= $min_width[$field_name];
                     $field_count--;
                 }
             }
         }
         // Second step. Set up the new width values.
         $perc = intval($max_perc / $field_count);
         foreach ($this->selected_fields as $field_name => $active) {
             if (!isset($min_width[$field_name]) || $min_width[$field_name] < $perc) {
                 $this->price_schema['fields'][$field_name]['min_width'] = $perc;
             } else {
                 $this->price_schema['fields'][$field_name]['min_width'] = $min_width[$field_name];
             }
         }
         fn_set_progress('echo', __('generating_pdf'), false);
         $this->render();
     }
     return $filename;
 }
开发者ID:ambient-lounge,项目名称:site,代码行数:38,代码来源:Pdf.php


示例12: fn_sdek_get_ticket_order

function fn_sdek_get_ticket_order($data_auth, $order_id, $chek_id)
{
    unset($data_auth['Number']);
    $xml = '            ' . RusSdek::arraySimpleXml('OrdersPrint', $data_auth, 'open');
    $order_sdek = array('Number' => $order_id . '_' . $chek_id, 'Date' => $data_auth['Date']);
    $xml .= '            ' . RusSdek::arraySimpleXml('Order', $order_sdek);
    $xml .= '            ' . '</OrdersPrint>';
    $response = RusSdek::xmlRequest('http://gw.edostavka.ru:11443/orders_print.php', $xml, $data_auth);
    $download_file_dir = fn_get_files_dir_path() . '/sdek' . '/' . $chek_id . '/';
    fn_rm($download_file_dir);
    fn_mkdir($download_file_dir);
    $name = $order_id . '.pdf';
    $download_file_path = $download_file_dir . $name;
    if (!fn_is_empty($response)) {
        fn_put_contents($download_file_path, $response);
    }
}
开发者ID:ambient-lounge,项目名称:site,代码行数:17,代码来源:orders.post.php


示例13: die

//
// $Id: site_layout.php 9938 2010-07-01 14:18:59Z 2tl $
//
if (!defined('AREA')) {
    die('Access denied');
}
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
    fn_trusted_vars("lang_data");
    $suffix = '';
    if ($mode == 'update_design_mode') {
        db_query("UPDATE ?:settings SET value = ?s WHERE option_name = ?s AND section_id = ?s", $action == $_REQUEST['design_mode'] ? 'Y' : 'N', $_REQUEST['design_mode'], '');
        if (!empty($_REQUEST['disable_mode'])) {
            db_query("UPDATE ?:settings SET value = 'N' WHERE option_name = ?s AND section_id = ?s", $_REQUEST['disable_mode'], '');
        }
        fn_rm(DIR_COMPILED . 'customer', false);
        fn_rm(DIR_COMPILED . 'admin', false);
        $suffix = '.design_mode';
    }
    if ($mode == 'update_logos') {
        $logos = fn_filter_uploaded_data('logotypes');
        $areas = fn_get_manifest_definition();
        fn_save_logo_alt($areas);
        // Update customer logotype
        if (!empty($logos)) {
            foreach ($logos as $type => $logo) {
                $area = $areas[$type];
                $manifest = parse_ini_file(DIR_SKINS . Registry::get('settings.skin_name_' . $area['skin']) . '/' . SKIN_MANIFEST, true);
                $filename = DIR_SKINS . Registry::get('settings.skin_name_' . $area['skin']) . '/' . $area['path'] . '/images/' . $logo['name'];
                if (fn_copy($logo['path'], $filename)) {
                    list($w, $h, ) = fn_get_image_size($filename);
                    $manifest[$area['name']]['filename'] = $logo['name'];
开发者ID:diedsmiling,项目名称:busenika,代码行数:31,代码来源:site_layout.php


示例14: fn_delete_theme

/**
 * Deletes theme
 * @param string $theme_name theme name to delete. If empty - deletes all themes
 * @return boolean true if deleted, false if not
 */
function fn_delete_theme($theme_name)
{
    $themes_dest = fn_get_theme_path('[themes]/' . $theme_name, 'C');
    $can_delete = true;
    if (fn_allowed_for('ULTIMATE')) {
        $company_themes = Settings::instance()->getAllVendorsValues('theme_name');
        if (in_array($theme_name, $company_themes)) {
            fn_set_notification('E', __('error'), __('error_delete_theme_company'));
            $can_delete = false;
        }
    } else {
        if ($theme_name == Registry::get('runtime.layout.theme_name')) {
            $can_delete = false;
            fn_set_notification('E', __('error'), __('cannot_remove_active_theme'));
        }
    }
    $layouts = db_get_array('SELECT layout_id, is_default FROM ?:bm_layouts WHERE theme_name = ?s', $theme_name);
    if ($can_delete && fn_rm($themes_dest)) {
        // Delete layout
        foreach ($layouts as $layout) {
            Layout::instance()->delete($layout['layout_id']);
        }
        return true;
    }
    return false;
}
开发者ID:arpad9,项目名称:bygmarket,代码行数:31,代码来源:fn.common.php


示例15: db_get_hash_array

            $fields = db_get_hash_array("SHOW COLUMNS FROM {$table}", 'Field');
            if (!empty($fields['is_global'])) {
                // Sort table by is_global field
                fn_echo('.');
                db_query("ALTER TABLE {$table} ORDER BY is_global DESC");
            } elseif (!empty($fields['position'])) {
                // Sort table by position field
                fn_echo('.');
                db_query("ALTER TABLE {$table} ORDER BY position");
            }
        }
        fn_set_notification('N', __('notice'), __('done'));
    }
    if ($mode == 'delete') {
        if (!empty($_REQUEST['backup_file'])) {
            fn_rm(Registry::get('config.dir.backups') . fn_basename($_REQUEST['backup_file']));
        }
    }
    return array(CONTROLLER_STATUS_OK, 'datakeeper.manage');
}
if ($mode == 'getfile' && !empty($_REQUEST['file'])) {
    fn_get_file(Registry::get('config.dir.backups') . fn_basename($_REQUEST['file']));
} elseif ($mode == 'manage') {
    $view = Tygh::$app['view'];
    // Calculate database size and fill tables array
    $status_data = db_get_array("SHOW TABLE STATUS");
    $database_size = 0;
    $all_tables = array();
    foreach ($status_data as $k => $v) {
        $database_size += $v['Data_length'] + $v['Index_length'];
        $all_tables[] = $v['Name'];
开发者ID:askzap,项目名称:ultimate,代码行数:31,代码来源:datakeeper.php


示例16: array

    $areas = array('customer', 'admin', 'mail');
    $installed_skins = fn_get_dir_contents(DIR_SKINS);
    foreach ($installed_skins as $skin_name) {
        foreach ($areas as $area) {
            if (is_dir(DIR_SKINS . $skin_name . '/' . $area . '/addons/' . $addon)) {
                if (!defined('DEVELOPMENT')) {
                    fn_rm(DIR_SKINS . $skin_name . '/' . $area . '/addons/' . $addon);
                }
            }
        }
    }
    $msg = fn_get_lang_var('text_addon_uninstalled');
    fn_set_notification('N', fn_get_lang_var('notice'), str_replace('[addon]', $addon_name, $msg));
    // Clean cache
    fn_rm(DIR_COMPILED, false);
    fn_rm(DIR_CACHE, false);
    return array(CONTROLLER_STATUS_OK, "addons.manage");
} elseif ($mode == 'update_status') {
    fn_get_schema('settings', 'actions', 'php', false, true);
    $old_status = db_get_field("SELECT status FROM ?:addons WHERE addon = ?s", $_REQUEST['id']);
    $new_status = $_REQUEST['status'];
    if ($old_status != $new_status) {
        $func = 'fn_settings_actions_addons_' . $_REQUEST['id'];
        if (function_exists($func)) {
            $func($new_status, $old_status);
        }
        if ($old_status != $new_status) {
            db_query("UPDATE ?:addons SET status = ?s WHERE addon = ?s", $_REQUEST['status'], $_REQUEST['id']);
            fn_set_notification('N', fn_get_lang_var('notice'), fn_get_lang_var('status_changed'));
        } else {
            $ajax->assign('return_status', $old_status);
开发者ID:diedsmiling,项目名称:busenika,代码行数:31,代码来源:addons.php


示例17: fn_addons_move_and_install

/**
 * Move addon pack from temporarily folder to specified place and install it if possible
 *
 * @param string $from Source path
 * @param string $to Destination path
 * @return bool true if installed, false otherwise
 */
function fn_addons_move_and_install($from, $to)
{
    if (defined('AJAX_REQUEST')) {
        Registry::get('ajax')->assign('non_ajax_notifications', true);
    }
    $struct = fn_get_dir_contents($from, false, true, '', '', true);
    $addon_name = '';
    foreach ($struct as $file) {
        if (preg_match('/app.+?addons[^a-zA-Z0-9_]+([a-zA-Z0-9_-]+).+?addon.xml$/i', $file, $matches)) {
            if (!empty($matches[1])) {
                $addon_name = $matches[1];
                break;
            }
        }
    }
    $relative_addon_path = str_replace(Registry::get('config.dir.root') . '/', '', Registry::get('config.dir.addons'));
    if (!file_exists($from . $relative_addon_path . $addon_name . '/addon.xml')) {
        fn_set_notification('E', __('error'), __('broken_addon_pack'));
        return false;
    }
    fn_copy($from, $to);
    fn_install_addon($addon_name);
    fn_rm($from);
    return true;
}
开发者ID:OneataBogdan,项目名称:lead_coriolan,代码行数:32,代码来源:fn.addons.php


示例18: deleteByPattern

 /**
  * Deletes files using glob pattern
  *
  * @param  string  $pattern glob-compatible pattern
  * @return boolean true if deleted successfully, false - otherwise
  */
 public function deleteByPattern($pattern)
 {
     $files = glob($this->prefix($pattern));
     if (!empty($files)) {
         foreach ($files as $file) {
             fn_rm($file);
         }
     }
     return true;
 }
开发者ID:ambient-lounge,项目名称:site,代码行数:16,代码来源:File.php


示例19: fn_update_payment

/**
 * Create/Update payments data
 *
 * @param array $payment_data
 * @param int $payment_id
 * @param string $lang_code 2-letter language code
 * @return int Payment id
 */
function fn_update_payment($payment_data, $payment_id, $lang_code = DESCR_SL)
{
    $certificate_file = fn_filter_uploaded_data('payment_certificate');
    $certificates_dir = Registry::get('config.dir.certificates');
    fn_set_hook('update_payment_pre', $payment_data, $payment_id, $lang_code, $certificate_file, $certificates_dir);
    /**
     * Create/update the certificate file
     * only for an existing payment method.
     *
     * Non-existing payment method will be created first,
     * then will be updated. (fn_update_payment calling at line 450).
     */
    if ($payment_id) {
        if ($certificate_file) {
            $file = reset($certificate_file);
            $filename = $payment_id . '/' . $file['name'];
            fn_mkdir($certificates_dir . $payment_id);
            fn_copy($file['path'], $certificates_dir . $filename);
            $payment_data['processor_params']['certificate_filename'] = $filename;
        }
        $old_params = fn_get_processor_data($payment_id);
        if (empty($payment_data['processor_params']['certificate_filename']) && isset($old_params['processor_params']['certificate_filename'])) {
            $payment_data['processor_params']['certificate_filename'] = $old_params['processor_params']['certificate_filename'];
        }
        if (!empty($payment_data['processor_params']['certificate_filename'])) {
            if (!empty($old_params['processor_params']['certificate_filename']) && $payment_data['processor_params']['certificate_filename'] != $old_params['processor_params']['certificate_filename']) {
                fn_rm($certificates_dir . $old_params['processor_params']['certificate_filename']);
            }
            if (!file_exists($certificates_dir . $payment_data['processor_params']['certificate_filename'])) {
                $payment_data['processor_params']['certificate_filename'] = '';
            }
        }
    }
    if (!empty($payment_data['processor_id'])) {
        $payment_data['template'] = db_get_field("SELECT processor_template FROM ?:payment_processors WHERE processor_id = ?i", $payment_data['processor_id']);
    }
    $payment_data['localization'] = !empty($payment_data['localization']) ? fn_implode_localizations($payment_data['localization']) : '';
    $payment_data['usergroup_ids'] = empty($payment_data['usergroup_ids']) ? USERGROUP_ALL : (is_array($payment_data['usergroup_ids']) ? implode(',', $payment_data['usergroup_ids']) : $payment_data['usergroup_ids']);
    $payment_data['tax_ids'] = !empty($payment_data['tax_ids']) ? fn_create_set($payment_data['tax_ids']) : '';
    // Update payment processor settings
    $processor_params = array();
    if (!empty($payment_data['processor_params'])) {
        $processor_params = $payment_data['processor_params'];
        $payment_data['processor_params'] = serialize($payment_data['processor_params']);
    }
    if (!empty($payment_id)) {
        $arow = db_query("UPDATE ?:payments SET ?u WHERE payment_id = ?i", $payment_data, $payment_id);
        db_query("UPDATE ?:payment_descriptions SET ?u WHERE payment_id = ?i AND lang_code = ?s", $payment_data, $payment_id, $lang_code);
        if ($arow === false) {
            fn_set_notification('E', __('error'), __('object_not_found', array('[object]' => __('payment'))), '', '404');
            $payment_id = false;
        }
    } else {
        $payment_data['payment_id'] = $payment_id = db_query("INSERT INTO ?:payments ?e", $payment_data);
        foreach (fn_get_translation_languages() as $payment_data['lang_code'] => $_v) {
            db_query("INSERT INTO ?:payment_descriptions ?e", $payment_data);
        }
        /**
         * Update the certificate
         */
        if ($certificate_file && $payment_id) {
            unset($payment_data['lang_code']);
            $payment_data['processor_params'] = $processor_params;
            fn_update_payment($payment_data, $payment_id, $lang_code);
        }
    }
    fn_attach_image_pairs('payment_image', 'payment', $payment_id, $lang_code);
    fn_set_hook('update_payment_post', $payment_data, $payment_id, $lang_code, $certificate_file, $certificates_dir, $processor_params);
    return $payment_id;
}
开发者ID:heg-arc-ne,项目名称:cscart,代码行数:78,代码来源:fn.cart.php


示例20: fn_set_notification

            if (empty($_REQUEST['pattern_id'])) {
                fn_set_notification('E', __('error'), __('error_exim_pattern_not_found'));
            } else {
                $pattern = fn_get_pattern_definition($_REQUEST['pattern_id'], 'import');
                if (($data = fn_get_csv($pattern, $file[0]['path'], $_REQUEST['import_options'])) != false) {
                    fn_import($pattern, $data, $_REQUEST['import_options']);
                }
            }
        } else {
            fn_set_notification('E', __('error'), __('error_exim_no_file_uploaded'));
        }
        return array(CONTROLLER_STATUS_OK, 'exim.import?section=' . $_REQUEST['section'] . '&pattern_id=' . $_REQUEST['pattern_id']);
    }
    if ($mode == 'delete_file' && !empty($_REQUEST['filename'])) {
        $file = fn_basename($_REQUEST['filename']);
        fn_rm(fn_get_files_dir_path() . $file);
        return array(CONTROLLER_STATUS_REDIRECT);
    }
    if ($mode == 'delete_range') {
        unset($_SESSION['export_ranges'][$_REQUEST['section']]);
        return array(CONTROLLER_STATUS_REDIRECT, 'exim.export?section=' . $_REQUEST['section'] . '&pattern_id=' . $_REQUEST['pattern_id']);
    }
    exit;
}
if ($mode == 'export') {
    if (empty($_REQUEST['section'])) {
        $_REQUEST['section'] = 'products';
    }
    list($sections, $patterns) = fn_get_patterns($_REQUEST['section'], 'export');
    if (empty($sections) && empty($patterns) || isset($_REQUEST['section']) && empty($sections[$_REQUEST['section']])) {
        return array(CONTROLLER_STATUS_DENIED);
开发者ID:arpad9,项目名称:bygmarket,代码行数:31,代码来源:exim.php



注:本文中的fn_rm函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP fn_save_cart_content函数代码示例发布时间:2022-05-15
下一篇:
PHP fn_restore_post_data函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap