} foreach ($export_columns as $id => $export_column) { $field_source = $export_column["source"]; $column_title = $export_column["title"]; $column_checked = $export_column["checked"]; $column_link = isset($export_column["link"]) ? $export_column["link"] : ""; set_db_column($column_title, $field_source, $column_checked, $column_link); } if ($total_columns % 2 != 0) { $t->parse("columns", true); } $t->set_var("total_columns", $total_columns); if (!strlen($template_id)) { $t->parse("custom_link", false); if (isset($related_columns)) { $admin_export_custom_url->remove_parameter("field"); $admin_export_custom_url->add_parameter("table", CONSTANT, $related_table); $t->set_var("admin_export_custom_related_url", $admin_export_custom_url->get_url()); $t->parse("custom_related", false); } } $t->pparse("main"); function get_field_value($field_source) { global $db, $db_columns, $related_columns, $related_table_alias, $apply_translation, $date_formats, $date_edit_format, $datetime_edit_format; if (preg_match_all("/\\{(\\w+)\\}/i", $field_source, $matches)) { $field_value = $field_source; for ($p = 0; $p < sizeof($matches[1]); $p++) { $f_source = $matches[1][$p]; // get field type $column_type = TEXT;
$t->set_var("catalog_description", ""); } } $is_next_record = $db->next_record(); $is_new_top = $top_category_id != $db->f("top_category_id"); if ($categories_type == 2) { if (intval($shown_sub_categories) >= $catalog_sub_number || $shown_sub_categories == 0) { if ($sub_category_id && (!$allowed_sub_categories_ids || !in_array($sub_category_id, $allowed_sub_categories_ids))) { $t->set_var("restricted_sub_class", " restrictedSubCategory"); $t->sparse("restricted_sub_image", false); } else { $t->set_var("restricted_sub_class", ""); $t->set_var("restricted_sub_image", ""); } if ($friendly_urls && $sub_friendly_url) { $list_url->remove_parameter("category_id"); $t->set_var("list_url", htmlspecialchars($list_url->get_url($sub_friendly_url . $friendly_extension))); } else { $list_url->add_parameter("category_id", CONSTANT, $sub_category_id); $t->set_var("list_url", htmlspecialchars($list_url->get_url($list_page))); } if ($category_id == $sub_category_id) { $t->set_var("class_sub_selected", "selectedsubCategory"); } else { $t->set_var("class_sub_selected", "subCategory"); } if ($is_next_record && !$is_new_top) { $t->parse("catalog_sub_separator", false); } else { $t->set_var("catalog_sub_separator", ""); }