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

PHP fn_echo函数代码示例

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

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



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

示例1: out

 public function out()
 {
     if ($this->position > $this->max_length) {
         $this->position = 0;
         fn_echo('<br />');
     }
     fn_echo($this->symbol);
     $this->position++;
 }
开发者ID:askzap,项目名称:ultimate,代码行数:9,代码来源:class.counter.php


示例2: fn_yml_get_price_id

if ($mode == 'generate' || $mode == 'get') {
    $access_key = !empty($_REQUEST['access_key']) ? $_REQUEST['access_key'] : '';
    $price_id = !empty($_REQUEST['price_id']) ? $_REQUEST['price_id'] : 0;
    if (empty($price_id) && !empty($access_key)) {
        $price_id = fn_yml_get_price_id($access_key);
    }
    $options = fn_yml_get_options($price_id);
    if (!empty($options) && $options['enable_authorization'] == 'Y' && empty($access_key)) {
        $options = array();
    }
    if (!empty($options)) {
        $company_id = Registry::get('runtime.company_id');
        if (fn_allowed_for('MULTIVENDOR')) {
            $company_id = 0;
        }
        $offset = !empty($_REQUEST['offset']) ? $_REQUEST['offset'] : 0;
        $lang_code = DESCR_SL;
        if (Registry::isExist('languages.ru')) {
            $lang_code = 'ru';
        }
        $yml = new Yml2($company_id, $price_id, $lang_code, $offset, isset($_REQUEST['debug']));
        if ($mode == 'get') {
            $yml->get();
        } else {
            $yml->generate();
        }
    } else {
        fn_echo(__("error"));
    }
    exit;
}
开发者ID:ambient-lounge,项目名称:site,代码行数:31,代码来源:yml.php


示例3: createDb

 /**
  * Creates database and imports dump there
  * @param  string  $db_name db name
  * @return boolean true on success, false - otherwise
  */
 public static function createDb($db_name = '')
 {
     $snapshot_dir = Registry::get('config.dir.snapshots');
     $dbdump_filename = empty($db_name) ? 'cmp_current.sql' : 'cmp_release.sql';
     if (!fn_mkdir($snapshot_dir)) {
         fn_set_notification('E', __('error'), __('text_cannot_create_directory', array('[directory]' => fn_get_rel_dir($snapshot_dir))));
         return false;
     }
     $dump_file = $snapshot_dir . $dbdump_filename;
     if (is_file($dump_file)) {
         if (!is_writable($dump_file)) {
             fn_set_notification('E', __('error'), __('dump_file_not_writable'));
             return false;
         }
     }
     $fd = @fopen($snapshot_dir . $dbdump_filename, 'w');
     if (!$fd) {
         fn_set_notification('E', __('error'), __('dump_cant_create_file'));
         return false;
     }
     if (!empty($db_name)) {
         Database::changeDb($db_name);
     }
     // set export format
     db_query("SET @SQL_MODE = 'MYSQL323'");
     fn_start_scroller();
     $create_statements = array();
     $insert_statements = array();
     $status_data = db_get_array("SHOW TABLE STATUS");
     $dbdump_tables = array();
     foreach ($status_data as $k => $v) {
         $dbdump_tables[] = $v['Name'];
     }
     // get status data
     $t_status = db_get_hash_array("SHOW TABLE STATUS", 'Name');
     foreach ($dbdump_tables as $k => $table) {
         fn_echo('<br />' . __('backupping_data') . ': <b>' . $table . '</b>&nbsp;&nbsp;');
         $total_rows = db_get_field("SELECT COUNT(*) FROM {$table}");
         $index = db_get_array("SHOW INDEX FROM {$table}");
         $order_by = array();
         foreach ($index as $kk => $vv) {
             if ($vv['Key_name'] == 'PRIMARY') {
                 $order_by[] = '`' . $vv['Column_name'] . '`';
             }
         }
         if (!empty($order_by)) {
             $order_by = 'ORDER BY ' . implode(',', $order_by);
         } else {
             $order_by = '';
         }
         // Define iterator
         if (!empty($t_status[$table]) && $t_status[$table]['Avg_row_length'] < DB_MAX_ROW_SIZE) {
             $it = DB_ROWS_PER_PASS;
         } else {
             $it = 1;
         }
         for ($i = 0; $i < $total_rows; $i = $i + $it) {
             $table_data = db_get_array("SELECT * FROM {$table} {$order_by} LIMIT {$i}, {$it}");
             foreach ($table_data as $_tdata) {
                 $_tdata = fn_add_slashes($_tdata, true);
                 $values = array();
                 foreach ($_tdata as $v) {
                     $values[] = $v !== null ? "'{$v}'" : 'NULL';
                 }
                 fwrite($fd, "INSERT INTO {$table} (`" . implode('`, `', array_keys($_tdata)) . "`) VALUES (" . implode(', ', $values) . ");\n");
             }
             fn_echo(' .');
         }
     }
     fn_stop_scroller();
     if (!empty($db_name)) {
         Settings::instance()->reloadSections();
     }
     if (fn_allowed_for('ULTIMATE')) {
         $companies = fn_get_short_companies();
         asort($companies);
         $settings['company_root'] = Settings::instance()->getList();
         foreach ($companies as $k => $v) {
             $settings['company_' . $k] = Settings::instance()->getList(0, 0, false, $k);
         }
     } else {
         $settings['company_root'] = Settings::instance()->getList();
     }
     if (!empty($db_name)) {
         Database::changeDb(Registry::get('config.db_name'));
     }
     $settings = self::processSettings($settings, '');
     $settings = self::formatSettings($settings['data']);
     ksort($settings);
     $data = print_r($settings, true);
     fwrite($fd, $data);
     fclose($fd);
     @chmod($snapshot_dir . $dbdump_filename, DEFAULT_FILE_PERMISSIONS);
     return true;
 }
开发者ID:askzap,项目名称:ultimate,代码行数:100,代码来源:Snapshot.php


示例4: fn_log_event

        // Log database optimization
        fn_log_event('database', 'optimize');
        $all_tables = db_get_fields("SHOW TABLES");
        fn_set_progress('parts', sizeof($all_tables));
        foreach ($all_tables as $table) {
            fn_set_progress('echo', __('optimizing_table') . "&nbsp;<b>{$table}</b>...<br />");
            db_query("OPTIMIZE TABLE {$table}");
            db_query("ANALYZE TABLE {$table}");
            $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') {
开发者ID:askzap,项目名称:ultimate,代码行数:31,代码来源:datakeeper.php


示例5: changeTitle

 /**
  * Updates progress bar title
  * @param string $text title text
  */
 public function changeTitle($text = '')
 {
     return fn_echo("<script type=\"text/javascript\">parent.Tygh.\$('#comet_container_controller').ceProgress('setTitle', " . json_encode(array('title' => $text)) . ');</script>');
 }
开发者ID:arpad9,项目名称:bygmarket,代码行数:8,代码来源:Ajax.php


示例6: fn_se_get_products_data

function fn_se_get_products_data($product_ids, $company_id = 0, $lang_code = NULL, $fl_echo = true)
{
    $xml = '';
    $products = array();
    if (!empty($product_ids)) {
        list($products) = fn_get_products(array('disable_searchanise' => true, 'area' => 'A', 'sort_by' => 'null', 'pid' => $product_ids, 'extend' => array('description', 'search_words', 'popularity', 'sales')), 0, $lang_code);
    }
    if ($fl_echo) {
        fn_echo('.');
    }
    if (!empty($products)) {
        foreach ($products as &$_product) {
            $_product['exclude_from_calculate'] = true;
            //pass additional params to fn_gather_additional_products_data for some speed up
        }
        fn_gather_additional_products_data($products, array('get_features' => false, 'get_icon' => true, 'get_detailed' => true, 'get_options' => false, 'get_discounts' => false, 'get_taxed_prices' => false));
        if ($fl_echo) {
            fn_echo('.');
        }
        if (!fn_allowed_for('ULTIMATE:FREE')) {
            $usergroups = empty($usergroups) ? array_merge(fn_get_default_usergroups(), db_get_hash_array("SELECT a.usergroup_id, a.status, a.type FROM ?:usergroups as a WHERE a.type = 'C' ORDER BY a.usergroup_id", 'usergroup_id')) : $usergroups;
        } else {
            $usergroups = array();
        }
        fn_se_get_products_additionals($products, $company_id, $lang_code);
        fn_se_get_products_features($products, $company_id, $lang_code);
        $schema = $items = array();
        foreach ($products as $product) {
            $item = array();
            $data = fn_se_prepare_product_data($product, $usergroups, $company_id, $lang_code);
            foreach ($data as $name => $d) {
                $name = isset($d['name']) ? $d['name'] : $name;
                $item[$name] = $d['value'];
                unset($d['value']);
                if (!empty($d)) {
                    $schema[$name] = $d;
                }
            }
            $items[] = $item;
        }
    }
    return array('schema' => $schema, 'items' => $items);
}
开发者ID:heg-arc-ne,项目名称:cscart,代码行数:43,代码来源:searchanise.php


示例7: fn_get_theme_path

    //fn_set_notification('I','view>',print_r($view));
    $view->assign('total_print', $total_print);
    $view->assign('order_info', $order_info);
    $view->assign('fonts_path', fn_get_theme_path('[relative]/[theme]/media/fonts'));
    if ($order_info['shipping_cost'] != 0) {
        $view->assign('shipping_cost', true);
    }
    if ($mode == "send_account_payment") {
        if (!empty($order_info['email'])) {
            fn_disable_live_editor_mode();
            $html = array($view->displayMail('addons/rus_payments/print_invoice_payment.tpl', false, 'C'));
            Pdf::render($html, fn_get_files_dir_path() . 'account_payment.pdf', 'save');
            $data = array('order_info' => $order_info, 'total_print' => $total_print, 'fonts_path' => fn_get_theme_path('[relative]/[theme]/media/fonts'));
            Mailer::sendMail(array('to' => $order_info['email'], 'from' => 'default_company_orders_department', 'data' => $data, 'attachments' => array(fn_get_files_dir_path() . 'account_payment.pdf'), 'tpl' => 'addons/rus_payments/print_invoice_payment.tpl', 'is_html' => true), 'A');
            fn_set_notification('N', __('notice'), __('text_email_sent'));
        }
    } else {
        $view->assign('show_print_button', true);
        $view->displayMail('addons/rus_payments/print_invoice_payment.tpl', true, 'C');
    }
    exit;
} elseif ($mode == 'get_stamp') {
    Header("Content-Type: image/png");
    Header("Content-Type: image/jpg");
    Header("Content-Type: image/jpeg");
    Header("Content-Type: image/gif");
    $path_stamp = fn_get_image_pairs($_REQUEST['payment_id'], 'stamp', 'M', true, true, DESCR_SL);
    $image = fn_get_contents($path_stamp['icon']['absolute_path']);
    fn_echo($image);
    exit;
}
开发者ID:ambient-lounge,项目名称:site,代码行数:31,代码来源:orders.post.php


示例8: fn_google_export_add_additional_google_categories

function fn_google_export_add_additional_google_categories()
{
    $available_langs = array_keys(fn_google_export_available_categories());
    fn_echo(__('google_export_start_import'));
    foreach ($available_langs as $lang) {
        $new_feature = array("Google product category ({$lang})" => array('S' => fn_get_google_categories($lang)));
        $parent_feature_id = db_get_field("SELECT feature_id FROM ?:product_features_descriptions WHERE description = 'Google export features' AND lang_code = ?s", DEFAULT_LANGUAGE);
        fn_google_export_add_feature($new_feature, $parent_feature_id, true);
        fn_google_export_update_alt_languages('product_features_descriptions', 'feature_id', true);
        fn_google_export_update_alt_languages('product_feature_variant_descriptions', 'variant_id', true);
    }
}
开发者ID:askzap,项目名称:ultimate,代码行数:12,代码来源:func.php


示例9: fn_send_confirmation_email

function fn_send_confirmation_email($subscriber_id, $list_id, $email, $lang_code = CART_LANGUAGE)
{
    $list = fn_get_mailing_list_data($list_id);
    if ($list['register_autoresponder']) {
        $autoresponder = fn_get_newsletter_data($list['register_autoresponder']);
        $body = $autoresponder['body_html'];
        $body = fn_render_newsletter($body, array('list_id' => $list_id, 'subscriber_id' => $subscriber_id, 'email' => $email));
        if (AREA == 'A') {
            fn_echo(__('sending_email_to', array('[email]' => $email)) . '<br />');
        }
        fn_send_newsletter($email, $list, $autoresponder['newsletter'], $body, array(), $lang_code, $list['reply_to']);
    }
}
开发者ID:OneataBogdan,项目名称:lead_coriolan,代码行数:13,代码来源:func.php


示例10: fn_yandex_auth_error

function fn_yandex_auth_error($msg)
{
    header('WWW-Authenticate: Basic realm="Authorization required"');
    header('HTTP/1.0 401 Unauthorized');
    fn_echo($msg);
    exit;
}
开发者ID:ambient-lounge,项目名称:site,代码行数:7,代码来源:func.php


示例11: fn_export

function fn_export($pattern, $export_fields, $options)
{
    if (!empty($pattern['pre_processing'])) {
        $func = $pattern['pre_processing'];
        $function = array_shift($func);
        $args = $func;
        foreach ($args as $k => $v) {
            if (strpos($v, '@') !== false) {
                $_opt = str_replace('@', '', $v);
                $args[$k] = isset($options[$_opt]) ? $options[$_opt] : '';
            }
        }
        call_user_func_array($function, $args);
    }
    if (isset($options['fields_names'])) {
        if ($options['fields_names']) {
            $fields_names = $export_fields;
            $export_fields = array_keys($export_fields);
        }
    }
    $primary_key = $pattern['key'];
    array_walk($primary_key, 'fn_attach_value_helper', $pattern['table'] . '.');
    $table_fields = $primary_key;
    $joins = array();
    $processes = array();
    $conditions = array();
    // Build list of fields that should be retrieved from the database
    foreach ($pattern['export_fields'] as $field => $data) {
        if (!in_array($field, $export_fields)) {
            continue;
        }
        // Do no link this field
        if (isset($data['linked']) && $data['linked'] == false) {
            // do something?
        } elseif (empty($data['table']) || $data['table'] == $pattern['table']) {
            $table_fields[] = $pattern['table'] . '.' . (!empty($data['db_field']) ? $data['db_field'] . ' as "' . $field . '"' : $field);
            // Linked object tables
        } else {
            $table_fields[] = $data['table'] . '.' . (!empty($data['db_field']) ? $data['db_field'] . ' as "' . $field . '"' : $field);
        }
        if (!empty($data['process_get'])) {
            $processes[$field]['function'] = array_shift($data['process_get']);
            $processes[$field]['args'] = $data['process_get'];
        }
    }
    // Build the list of joins
    if (!empty($pattern['references'])) {
        foreach ($pattern['references'] as $table => $data) {
            $ref = array();
            foreach ($data['reference_fields'] as $k => $v) {
                if (strval($v) == 'key' || strval($v) == '#key') {
                    $_val = sizeof($primary_key) == 1 ? reset($primary_key) : '';
                } elseif ($v[0] == '&') {
                    $_val = $pattern['table'] . '.' . substr($v, 1);
                } elseif (strpos($v, '@') !== false) {
                    $_opt = str_replace('@', '', $v);
                    $_val = "'" . $options[$_opt] . "'";
                } else {
                    $_val = "'{$v}'";
                }
                $ref[] = "{$table}.{$k} = {$_val}";
                // fixme
            }
            $joins[] = $data['join_type'] . ' JOIN ?:' . $table . " as {$table} ON " . implode(' AND ', $ref);
        }
    }
    // Add retrieve conditions
    if (!empty($pattern['condition'])) {
        $_cond = array();
        foreach ($pattern['condition'] as $field => $value) {
            if (is_array($value)) {
                $_val = implode("','", $value);
            } elseif (strpos($value, '@') !== false) {
                $_opt = str_replace('@', '', $value);
                $_val = $options[$_opt];
            } else {
                $_val = $value;
            }
            $_cond[] = $pattern['table'] . ".{$field} IN ('{$_val}')";
        }
        $conditions[] = implode(' AND ', $_cond);
    }
    // Limit scope to the current vendor's products only (if in vendor mode)
    $company_condition = fn_get_company_condition('products.company_id', false);
    if (!empty($company_condition)) {
        $conditions[] = $company_condition;
    }
    // Build main query
    $query = "SELECT " . implode(', ', $table_fields) . " FROM ?:" . $pattern['table'] . " as " . $pattern['table'] . ' ' . implode(' ', $joins) . (!empty($conditions) ? ' WHERE ' . implode(' AND ', $conditions) : '');
    $step = 30;
    // define number of rows to get from database
    $iterator = 0;
    // start retrieving from
    $data_exported = false;
    fn_start_scroller();
    fn_echo(fn_get_lang_var('exporting_data') . '<br />');
    while ($data = db_get_array($query . " LIMIT {$iterator}, {$step}")) {
        $data_exported = true;
        $iterator += $step;
        $result = array();
//.........这里部分代码省略.........
开发者ID:diedsmiling,项目名称:busenika,代码行数:101,代码来源:exim.php


示例12: _convertOrders

 protected function _convertOrders($default_company_id)
 {
     $limit = 50;
     General::connectToOriginalDB(array('table_prefix' => General::formatPrefix()));
     db_query("UPDATE ?:order_data SET type='A' WHERE type='G'");
     //change marker for addon Reward points
     $orders_count = db_get_field("SELECT COUNT(*) FROM ?:orders");
     $crypt = new Crypt_Blowfish($this->store_data['crypt_key']);
     $crypt_new = new Crypt_Blowfish(Registry::get('config.crypt_key'));
     $location_fields = array('s_firstname as firstname', 's_lastname as lastname', 's_address as address', 's_address_2 as address_2', 's_city as city', 's_state as state', 's_country as country', 's_zipcode as zipcode', 's_phone as phone', 's_address_type as address_type');
     fn_set_progress('step_scale', ceil($orders_count / $limit));
     for ($i = 0; $i <= floor($orders_count / $limit); $i++) {
         $order_ids = db_get_fields("SELECT order_id FROM ?:orders LIMIT ?i, ?i", $i * $limit, $limit);
         $data = array();
         $shipment_items = array();
         fn_set_progress('echo', '<br />' . General::getUnavailableLangVar('converting_orders'), true);
         foreach ($order_ids as $order_id) {
             $order_info = array();
             $order_info['shipping'] = unserialize(db_get_field("SELECT data FROM ?:order_data WHERE type='L' AND order_id = ?i", $order_id));
             $order_info['products'] = db_get_hash_array("SELECT * FROM ?:order_details WHERE order_id = ?i", 'item_id', $order_id);
             $location = db_get_row("SELECT ?p FROM ?:orders WHERE order_id = ?i", implode(',', $location_fields), $order_id);
             if ($order_info['products']) {
                 foreach ($order_info['products'] as $cart_id => $product) {
                     if ($product['extra']) {
                         $order_info['products'][$cart_id]['extra'] = unserialize($product['extra']);
                     }
                 }
             }
             $products = array();
             foreach ($order_info['products'] as $cart_id => $product) {
                 $products[$cart_id] = $product['extra'];
                 $products[$cart_id]['amount'] = $product['amount'];
                 $products[$cart_id]['product_id'] = $product['product_id'];
             }
             $product_groups = $this->_groupProductsListOrder($products);
             $shippings = array();
             foreach ($product_groups as $key_group => $group) {
                 if (!empty($order_info['shipping'])) {
                     foreach ($order_info['shipping'] as $shipping_id => $shipping) {
                         $_shipping = $shipping;
                         $_shipping['shipping_id'] = $shipping_id;
                         unset($_shipping['rates']);
                         if (isset($_shipping['tracking_number'])) {
                             $shipment = array('shipping_id' => $shipping_id, 'tracking_number' => $_shipping['tracking_number'], 'carrier' => strtolower($_shipping['carrier']));
                             $shipment_id = db_query("INSERT INTO ?:shipments ?e", $shipment);
                             foreach ($group['products'] as $cart_id => $product) {
                                 $shipment_items[] = array('item_id' => $cart_id, 'shipment_id' => $shipment_id, 'order_id' => $order_id, 'product_id' => $product['product_id'], 'amount' => $product['amount']);
                             }
                             unset($_shipping['tracking_number']);
                             unset($_shipping['carrier']);
                         }
                         if (!empty($shipping_id)) {
                             foreach ($shipping['rates'] as $company_id => $rate) {
                                 if ($company_id == $group['company_id'] || $company_id == 0 && $group['company_id'] == $default_company_id) {
                                     $_shipping['rate'] = $rate;
                                     $_shipping['group_key'] = $key_group;
                                     $product_groups[$key_group]['shippings'][$shipping_id] = $_shipping;
                                     $product_groups[$key_group]['chosen_shippings'][] = $_shipping;
                                     $product_groups[$key_group]['package_info'] = !empty($_shipping['packages_info']) ? $_shipping['packages_info'] : array();
                                     $product_groups[$key_group]['package_info']['location'] = $location;
                                     $shippings[$shipping_id] = !empty($shippings[$shipping_id]) ? $shippings[$shipping_id] : $_shipping;
                                     $shippings[$shipping_id]['rates'][$key_group] = $shipping_id;
                                 }
                             }
                         }
                     }
                 }
             }
             $payment_info = db_get_field("SELECT data FROM ?:order_data WHERE type='P' AND order_id = ?i", $order_id);
             if (!empty($payment_info)) {
                 $payment_info = $crypt->decrypt(base64_decode($payment_info));
                 $payment_info = base64_encode($crypt_new->encrypt($payment_info));
                 $data[] = array('order_id' => $order_id, 'type' => 'P', 'data' => $payment_info);
             }
             $data[] = array('order_id' => $order_id, 'type' => 'G', 'data' => serialize($product_groups));
             $data[] = array('order_id' => $order_id, 'type' => 'L', 'data' => serialize(array_values($shippings)));
             fn_echo(' .');
         }
         if (!empty($data)) {
             db_query("REPLACE INTO ?:order_data ?m", $data);
         }
         if (!empty($shipment_items)) {
             db_query("REPLACE INTO ?:shipment_items ?m", $shipment_items);
         }
     }
     db_query("UPDATE ?:shipments SET carrier = LOWER(carrier);");
     db_query("UPDATE ?:shipments SET carrier = 'usps' WHERE carrier = 'usp';");
     db_query("UPDATE ?:shipments SET carrier = 'fedex' WHERE carrier = 'fdx';");
     db_query("UPDATE ?:shipments SET carrier = 'swisspost' WHERE carrier = 'chp';");
 }
开发者ID:heg-arc-ne,项目名称:cscart,代码行数:90,代码来源:F306T401.php


示例13: fn_install_addon

        fn_install_addon('twigmo', false);
        $_SESSION['twigmo_upgrade'] = array('upgrade_dirs' => $upgrade_dirs, 'install_src_dir' => $install_src_dir);
        fn_stop_scroller();
        echo '<br><br>';
        fn_redirect('upgrade_center.upgrade_twigmo.step2');
    }
}
if ($mode == 'upgrade_twigmo' and $action == 'step2' and isset($_SESSION['twigmo_upgrade']) && !fn_twg_is_on_saas()) {
    fn_start_scroller();
    fn_echo(__('twgadmin_restore_settings') . '<br>');
    fn_ftp_connect(Settings::instance()->getValues('Upgrade_center'));
    fn_echo('.');
    $upgrade_dirs = $_SESSION['twigmo_upgrade']['upgrade_dirs'];
    fn_echo('.');
    // Uninstal addon
    fn_uninstall_addon('twigmo', false);
    fn_echo('.');
    // Install
    fn_install_addon('twigmo', false);
    fn_echo('.');
    // Restore settings
    TwigmoUpgrade::restoreSettingsAndCSS($upgrade_dirs, $auth['user_id']);
    fn_echo('.');
    // Clear template cache
    fn_rm(Registry::get('config.dir.cache_templates'));
    fn_echo('.');
    fn_echo('<br><b>' . __('twgadmin_upgrade_completed') . '<b><br>');
    unset($_SESSION['twigmo_upgrade']);
    fn_stop_scroller();
    return array(CONTROLLER_STATUS_REDIRECT, 'addons.update?addon=twigmo');
}
开发者ID:askzap,项目名称:ultimate,代码行数:31,代码来源:upgrade_center.post.php


示例14: fn_se_echo_connect_progress

function fn_se_echo_connect_progress($text)
{
    if (!defined('AJAX_REQUEST')) {
        fn_echo($text);
    }
}
开发者ID:ambient-lounge,项目名称:site,代码行数:6,代码来源:func.php


示例15: str_replace

                        $address .= ', ' . $company_data['company_zipcode'];
                    }
                    if (!empty($company_data['company_country_descr'])) {
                        $address .= ', ' . $company_data['company_country_descr'];
                    }
                    $text_header = str_replace("%company_address%", $address, $text_header);
                    Mailer::sendMail(array('to' => $user_data['email'], 'from' => 'company_orders_department', 'data' => array('letter_body' => $text_header, 'subject' => $subject, 'products' => $products), 'tpl' => 'addons/abandoned_cart_reminder/notification.tpl'), 'C', $recipient_data['lang_code']);
                    if (!empty($copy_email)) {
                        Mailer::sendMail(array('to' => $copy_email, 'from' => 'company_orders_department', 'data' => array('letter_body' => $text_header, 'subject' => $subject, 'products' => $products), 'tpl' => 'addons/abandoned_cart_reminder/notification.tpl'), 'C', CART_LANGUAGE);
                    }
                    $sent++;
                    if ($reminder_number == 1) {
                        db_query("UPDATE ?:user_session_products SET abandoned_is_send_first = ?i WHERE user_id = ?i", time(), $recipient_data['user_id']);
                    } elseif ($reminder_number == 2) {
                        db_query("UPDATE ?:user_session_products SET abandoned_is_send_second = ?i WHERE user_id = ?i", time(), $recipient_data['user_id']);
                    }
                }
            }
        }
    }
}
$delete_days = Registry::get('addons.abandoned_cart_reminder.delete');
if (!empty($delete_days)) {
    $today_start = strtotime("00:00");
    $today_end = strtotime("23:59");
    $period_start = $today_start - intval($delete_days) * 24 * 60 * 60;
    $period_end = $today_end - intval($delete_days) * 24 * 60 * 60;
    db_query("DELETE FROM ?:user_session_products WHERE timestamp >= ?i AND timestamp <= ?i", $period_start, $period_end);
}
fn_echo('Sent messages: ' . $sent);
开发者ID:OneataBogdan,项目名称:lead_coriolan,代码行数:30,代码来源:check_abandoned_cart.php


示例16: fn_create_temp_file

                    }
                    $counter->out();
                }
                $tbl .= '</table>';
                $counter->out();
                Pdf::batchAdd($tbl);
            }
        }
    }
    //Close and output PDF document
    $temp_filename = fn_create_temp_file();
    $imp_filename = $temp_filename . '.pdf';
    fn_rename($temp_filename, $imp_filename);
    Pdf::batchRender($imp_filename, true);
    Storage::instance('assets')->put($filename, array('file' => $imp_filename, 'caching' => true));
    fn_echo('<br />' . __('done'));
}
/**
 *
 * Adds product data in HTML format to price list table
 * @param array $product Product data
 * @param array $selected_fields Product fields that should be in price list
 * @param string $style Product row style (similar to the HTML style attribute, e.g.: style="background-color: #EEEEEE")
 * @param array $price_schema Price list columns scheme
 * @param array $options_variants Product options variants
 *
 * @return string Product data row in HTML format
 */
function fn_price_list_print_product_data($product, $selected_fields, $style, $price_schema, $options_variants = array())
{
    $tbl = '<tr>';
开发者ID:askzap,项目名称:ultimate,代码行数:31,代码来源:pdf.php


示例17: fn_export


//.........这里部分代码省略.........
    }
    // Build the list of joins
    $joins = fn_export_build_joins($pattern, $options, $primary_key, $multi_lang);
    // Add retrieve conditions
    $conditions = fn_export_build_conditions($pattern, $options);
    if (!empty($pattern['pre_export_process'])) {
        $pre_export_process_data = array('pattern' => &$pattern, 'export_fields' => &$export_fields, 'options' => &$options, 'conditions' => &$conditions, 'joins' => &$joins, 'table_fields' => &$table_fields, 'processes' => &$processes);
        fn_exim_processing('export', $pattern['pre_export_process'], $options, $pre_export_process_data);
    }
    $total = db_get_field("SELECT COUNT(*) FROM ?:" . $pattern['table'] . " as " . $pattern['table'] . ' ' . implode(' ', $joins) . (!empty($conditions) ? ' WHERE ' . implode(' AND ', $conditions) : ''));
    fn_set_progress('parts', $total);
    fn_set_progress('step_scale', 1);
    $sorting = '';
    if (!empty($pattern['order_by'])) {
        $sorting = ' ORDER BY ' . $pattern['order_by'];
    }
    // Build main query
    $query = "SELECT " . implode(', ', $table_fields) . " FROM ?:" . $pattern['table'] . " as " . $pattern['table'] . ' ' . implode(' ', $joins) . (!empty($conditions) ? ' WHERE ' . implode(' AND ', $conditions) : '') . $sorting;
    $step = fn_floor_to_step(DB_LIMIT_SELECT_ROW, $count_langs);
    // define number of rows to get from database
    $iterator = 0;
    // start retrieving from
    $progress = 0;
    $data_exported = false;
    $main_lang = reset($multi_lang);
    $manual_multilang = true;
    $field_lang = '';
    foreach ($pattern['export_fields']['multilang'] as $key => $value) {
        if (array_search('languages', $value, true)) {
            if (!isset($value['linked']) || $value['linked'] === true) {
                $manual_multilang = false;
            }
            $field_lang = $key;
            break;
        }
    }
    if (empty($field_lang) || !in_array($field_lang, $export_fields)) {
        $multi_lang = array($main_lang);
        $count_langs = 1;
    }
    while ($data = db_get_array($query . " LIMIT {$iterator}, {$step}")) {
        $data_exported = true;
        if ($manual_multilang) {
            $data_lang = $data;
            $data = array();
            foreach ($data_lang as $data_key => $data_value) {
                $data[] = array_combine($multi_lang, array_fill(0, $count_langs, $data_value));
            }
        } else {
            $data_lang = array_chunk($data, $count_langs);
            $data = array();
            foreach ($data_lang as $data_key => $data_value) {
                // Sort
                foreach ($multi_lang as $lang_code) {
                    foreach ($data_value as $v) {
                        if (array_search($lang_code, $v, true)) {
                            $data[$data_key][$lang_code] = $v;
                        }
                    }
                }
            }
        }
        $result = array();
        foreach ($data as $k => $v) {
            $progress += $count_langs;
            fn_set_progress('echo', __('exporting_data') . ':&nbsp;<b>' . $progress . '</b>');
            fn_export_fill_fields($result[$k], $v, $processes, $pattern, $options);
        }
        $_result = array();
        foreach ($result as $k => $v) {
            foreach ($multi_lang as $lang_code) {
                $_data = array();
                foreach ($export_fields as $field) {
                    if (isset($fields_names[$field])) {
                        $_data[$fields_names[$field]] = $v[$lang_code][$field];
                    } else {
                        $_data[$field] = isset($v[$lang_code][$field]) ? $v[$lang_code][$field] : '';
                    }
                }
                $_result[] = $_data;
            }
        }
        // Put data
        $enclosure = isset($pattern['enclosure']) ? $pattern['enclosure'] : '"';
        fn_echo(' .');
        if (isset($pattern['func_save_content_to_file']) && is_callable($pattern['func_save_content_to_file'])) {
            call_user_func($pattern['func_save_content_to_file'], $_result, $options, $enclosure);
        } else {
            fn_put_csv($_result, $options, $enclosure);
        }
        $iterator += $step;
    }
    if (!empty($pattern['post_processing'])) {
        fn_set_progress('echo', __('processing'), false);
        if ($data_exported && file_exists(fn_get_files_dir_path() . $options['filename'])) {
            $data_exported = fn_exim_processing('export', $pattern['post_processing'], $options);
        }
    }
    return $data_exported;
}
开发者ID:arpad9,项目名称:bygmarket,代码行数:101,代码来源:exim.php


示例18: fn_exim_1c_init

function fn_exim_1c_init()
{
    fn_echo("zip=no\n");
    fn_echo('file_limit=' . FILE_LIMIT . "\n");
}
开发者ID:askzap,项目名称:ask-zap,代码行数:5,代码来源:func.php


示例19: fn_theme_editor_set_style

            fn_theme_editor_set_style($_REQUEST['style_id']);
            // If theme elements passed, get them
        } elseif (!empty($_REQUEST['style']['data'])) {
            $data = $_REQUEST['style']['data'];
            $data = Styles::factory($theme_name)->processCopy('', $data);
        }
        $less = new Less();
        $import_path[] = Registry::get('config.dir.root') . fn_get_theme_path('/[relative]/[theme]/css');
        $import_path[] = Registry::get('config.dir.root') . fn_get_theme_path('/[relative]/[theme]/css/tygh');
        $less->setImportDir($import_path);
        $content = $css_content . $less->customCompile($less_content, Registry::get('config.dir.root'), $data);
        // remove external fonts to avoid flickering when styles are reloaded
        //$content = preg_replace("/@font-face \{.*?\}/s", '', $content);
    }
    header('content-type: text/css');
    fn_echo($content);
    exit;
} elseif ($mode == 'duplicate') {
    // FIXME: Bacward preset compatibility
    if (!empty($_REQUEST['preset_id'])) {
        $_REQUEST['style_id'] = $_REQUEST['preset_id'];
    }
    if (!empty($_REQUEST['name']) && Styles::factory(fn_get_theme_path('[theme]', 'C'))->copy($_REQUEST['style_id'], $_REQUEST['name'])) {
        fn_theme_editor_set_style($_REQUEST['name']);
    } else {
        //FIXME: Presets backward compability
        $path = fn_get_theme_path('[relative]/[theme]/styles');
        if (!is_dir($path)) {
            $path = fn_get_theme_path('[relative]/[theme]/presets');
        }
        fn_set_notification('E', __('error'), __('theme_editor.style_data_cannot_be_saved', array('[theme_dir]' => $path)));
开发者ID:askzap,项目名称:ultimate,代码行数:31,代码来源:theme_editor.php


示例20: fn_redirect

/**
* Redirect browser to the new location
*
* @param string location - destination of redirect
* @param bool no_delay - do not delay redirection if output was performed
* @param bool allow_external_redirect - allow redirection to external resource
* @return
*/
function fn_redirect($location, $no_delay = false, $allow_external_redirect = false)
{
    $external_redirect = false;
    $protocol = defined('HTTPS') ? 'https' : 'http';
    // Cleanup location from &amp; signs and call fn_url()
    $location = str_replace('&amp;', '&', fn_url(str_replace(array("\n", "\r"), array('', ''), $location)));
    // Convert absolute link with location to relative one
    if (strpos($location, '://') !== false || substr($location, 0, 7) == 'mailto:') {
        if (strpos($location, Registry::get('config.http_location')) !== false) {
            $location = str_replace(array(Registry::get('config.http_location') . '/', Registry::get('config.http_location')), '', $location);
            $protocol = 'http';
        } elseif (strpos($location, Registry::get('config.https_location')) !== false) {
            $location = str_replace(array(Registry::get('config.https_location') . '/', Registry::get('config.https_location')), '', $location);
            $protocol = 'https';
        } else {
            if ($allow_external_redirect == false) {
                // if external redirects aren't allowed, redirect to index script
                $location = INDEX_SCRIPT;
            } else {
                $external_redirect = true;
            }
        }
        // Convert absol 

鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
PHP fn_explode函数代码示例发布时间:2022-05-15
下一篇:
PHP fn_delete_notification函数代码示例发布时间: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