<?php
/* --------------------------------------------------------------
gm_save_template_file.inc.php 2010-08-19 mb
Gambio GmbH
http://www.gambio.de
Copyright (c) 2010 Gambio GmbH
Released under the GNU General Public License (Version 2)
[http://www.gnu.org/licenses/gpl-2.0.html]
--------------------------------------------------------------
*/
?><?php
function gm_save_template_file($id, $content, $lang, $type) {
$gm_get_template = xtc_db_query("SELECT
filename,
folder
FROM gm_emails
WHERE gm_email_id = '" . $id . "'
LIMIT 1");
$template = xtc_db_fetch_array($gm_get_template);
@clearstatcache();
if(@is_writable(DIR_FS_CATALOG . 'templates/' . CURRENT_TEMPLATE . '/' . $template['folder'] . '/mail/' . $lang . '/' . $template['filename'] . '.' . $type))
{
$fp = fopen(DIR_FS_CATALOG . 'templates/' . CURRENT_TEMPLATE . '/' . $template['folder'] . '/mail/' . $lang . '/' . $template['filename'] . '.' . $type, "w+");
fwrite($fp, stripslashes($content));
fclose($fp);
return true;
}
else return false;
}
function gm_correct_config_tag($content){
$config_pos = strpos($content, '{config');
$config_pos2 = 0;
while($config_pos !== false){
$config_end_pos = strpos($content, '}', $config_pos2);
$content1 = substr($content, 0, $config_pos);
$content2 = substr($content, $config_pos, $config_end_pos-$config_pos+1);
$content3 = substr($content, $config_end_pos+1, strlen($content)-($config_end_pos+1));
$content = $content1 . str_replace('"', '"', $content2) . $content3;
$config_pos = strpos($content, '{config', $config_pos2);
if($config_pos !== false){
$config_pos = strpos($content, '{config', $config_pos+1);
$config_pos2 = $config_pos+1;
}
}
$config_pos = strpos($content, '<p>{config');
$config_pos2 = 0;
while($config_pos !== false){
$config_end_pos = strpos($content, '}</p>', $config_pos2);
$content1 = substr($content, 0, $config_pos);
$content2 = substr($content, $config_pos+3, $config_end_pos-$config_pos-2);
$content3 = substr($content, $config_end_pos+5, strlen($content)-($config_end_pos+1));
$content = $content1 . str_replace('"', '"', $content2) . $content3;
$config_pos = strpos($content, '<p>{config', $config_pos2);
if($config_pos !== false){
$config_pos = strpos($content, '<p>{config', $config_pos+1);
$config_pos2 = $config_pos+1;
}
}
return trim($content);
}
?>| nama | waktu | ukuran | owner | perm | aksi |
|---|---|---|---|---|---|
| .. | |||||
| check_data_type.inc.php | 2013-11-12 21:02 | 2.55 KB | 76129f60960:kunden | -xw-x----- | |
| get_robots.php | 2013-11-12 21:02 | 1.84 KB | 76129f60960:kunden | -xw-x----- | |
| gm_bookmarks_selector.inc.php | 2013-11-12 21:02 | 1.22 KB | 76129f60960:kunden | -xw-x----- | |
| gm_check_upload.inc.php | 2013-11-12 21:02 | 1007 B | 76129f60960:kunden | -xw-x----- | |
| gm_clear_string.inc.php | 2013-11-12 21:02 | 998 B | 76129f60960:kunden | -xw-x----- | |
| gm_convert_qty.inc.php | 2013-11-12 21:02 | 959 B | 76129f60960:kunden | -xw-x----- | |
| gm_create_corner.inc.php | 2013-11-12 21:02 | 5.88 KB | 76129f60960:kunden | -xw-x----- | |
| gm_delete_bookmarks.inc.php | 2013-11-12 21:02 | 1.46 KB | 76129f60960:kunden | -xw-x----- | |
| gm_edit_bookmarks.inc.php | 2013-11-12 21:02 | 2.93 KB | 76129f60960:kunden | -xw-x----- | |
| gm_get_alt_text.inc.php | 2013-11-12 21:02 | 1.8 KB | 76129f60960:kunden | -xw-x----- | |
| gm_get_bookmarks.inc.php | 2013-11-12 21:02 | 1.64 KB | 76129f60960:kunden | -xw-x----- | |
| gm_get_bookmarks_link.inc.php | 2013-11-12 21:02 | 3.15 KB | 76129f60960:kunden | -xw-x----- | |
| gm_get_categories_icon.inc.php | 2013-11-12 21:02 | 1.75 KB | 76129f60960:kunden | -xw-x----- | |
| gm_get_conf.inc.php | 2013-11-12 21:02 | 1.51 KB | 76129f60960:kunden | -xw-x----- | |
| gm_get_content.inc.php | 2013-11-12 21:02 | 2.01 KB | 76129f60960:kunden | -xw-x----- | |
| gm_get_content_by_group_id.inc.php | 2013-11-12 21:02 | 1.53 KB | 76129f60960:kunden | -xw-x----- | |
| gm_get_env_info.inc.php | 2013-11-12 21:02 | 2.78 KB | 76129f60960:kunden | -xw-x----- | |
| gm_get_google_changefreq.inc.php | 2013-11-12 21:02 | 1.74 KB | 76129f60960:kunden | -xw-x----- | |
| gm_get_language.inc.php | 2013-11-12 21:02 | 734 B | 76129f60960:kunden | -xw-x----- | |
| gm_get_language_link.inc.php | 2013-11-12 21:02 | 1.72 KB | 76129f60960:kunden | -xw-x----- | |
| gm_get_meta.inc.php | 2013-11-12 21:02 | 1.15 KB | 76129f60960:kunden | -xw-x----- | |
| gm_get_order_status_list.inc.php | 2013-11-12 21:02 | 1.16 KB | 76129f60960:kunden | -xw-x----- | |
| gm_get_privacy_link.inc.php | 2013-11-12 21:02 | 1.21 KB | 76129f60960:kunden | -xw-x----- | |
| gm_get_url_keywords.inc.php | 2013-11-12 21:02 | 1.17 KB | 76129f60960:kunden | -xw-x----- | |
| gm_is_valid_trusted_shop_id.inc.php | 2013-11-12 21:02 | 592 B | 76129f60960:kunden | -xw-x----- | |
| gm_mega_flyover_prepare.inc.php | 2013-11-12 21:02 | 590 B | 76129f60960:kunden | -xw-x----- | |
| gm_navigate_pages.inc.php | 2013-11-12 21:02 | 2.48 KB | 76129f60960:kunden | -xw-x----- | |
| gm_pdf_adress_format.inc.php | 2013-11-12 21:02 | 917 B | 76129f60960:kunden | -xw-x----- | |
| gm_pdf_is_installed.inc.php | 2013-11-12 21:02 | 835 B | 76129f60960:kunden | -xw-x----- | |
| gm_prepare_filename.inc.php | 2013-11-12 21:02 | 1.26 KB | 76129f60960:kunden | -xw-x----- | |
| gm_prepare_number.inc.php | 2013-11-12 21:02 | 561 B | 76129f60960:kunden | -xw-x----- | |
| gm_prepare_string.inc.php | 2013-11-12 21:02 | 1.09 KB | 76129f60960:kunden | -xw-x----- | |
| gm_save_order.inc.php | 2013-11-12 21:02 | 1.16 KB | 76129f60960:kunden | -xw-x----- | |
| gm_save_temp_template.inc.php | 2013-11-12 21:02 | 840 B | 76129f60960:kunden | -xw-x----- | |
| gm_save_template_file.inc.php | 2013-11-12 21:02 | 2.55 KB | 76129f60960:kunden | -xw-x----- | |
| gm_set_conf.inc.php | 2013-11-12 21:02 | 1.53 KB | 76129f60960:kunden | -xw-x----- | |
| gm_set_content.inc.php | 2013-11-12 21:02 | 1.69 KB | 76129f60960:kunden | -xw-x----- | |
| gm_split_sql_queries.inc.php | 2013-11-12 21:02 | 3.83 KB | 76129f60960:kunden | -xw-x----- | |
| gm_string_filter.inc.php | 2013-11-12 21:02 | 1.38 KB | 76129f60960:kunden | -xw-x----- | |
| gm_update_group_check.inc.php | 2013-11-12 21:02 | 2.07 KB | 76129f60960:kunden | -xw-x----- | |
| gm_utf8_decode.inc.php | 2013-11-12 21:02 | 731 B | 76129f60960:kunden | -xw-x----- | |
| gm_xtc_href_link.inc.php | 2013-11-12 21:02 | 5.12 KB | 76129f60960:kunden | -xw-x----- | |
| set_shipping_status.php | 2013-11-12 21:02 | 2.46 KB | 76129f60960:kunden | -xw-x----- | |
| write_sql_log.inc.php | 2013-11-12 21:02 | 2.25 KB | 76129f60960:kunden | -xw-x----- | |