本文整理汇总了PHP中fn_echo函数的典型用法代码示例。如果您正苦于以下问题:PHP fn_echo函数的具体用法?PHP fn_echo怎么用?PHP fn_echo使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了fn_echo函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: out
public function out()
{
if ($this->position > $this->max_length) {
$this->position = 0;
fn_echo('<br />');
}
fn_echo($this->symbol);
$this->position++;
}
示例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;
}
示例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> ');
$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;
}
示例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') . " <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') {
示例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>');
}
示例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);
}
示例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;
}
示例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);
}
}
示例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']);
}
}
示例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;
}
示例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();
//.........这里部分代码省略.........
示例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';");
}
示例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');
}
示例14: fn_se_echo_connect_progress
function fn_se_echo_connect_progress($text)
{
if (!defined('AJAX_REQUEST')) {
fn_echo($text);
}
}
示例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);