</ul> </div> <div id="sola_newsletter_preview" style="width: 800px;"> <div class="preview_desktop" id="preview_container"> <div class="preview_container"> <?php if ($camp->action == 3) { $letter = sola_nl_get_letter($camp->camp_id); //$inserted_data = sola_nl_build_automatic_content($camp->camp_id,false); //$table = preg_replace('/<table id="sola_nl_automatic_container"(.*?)<\/table>/is', $inserted_data, $letter); $table = ''; if ($table == '') { echo trim($letter); } else { echo trim($table); } } else { $letter = sola_nl_get_letter($_GET['camp_id']); if ($letter) { echo trim($letter); } else { trim(sola_nl_default_letter()); } } ?> </div> </div> </div>
function sola_nl_add_default_editor_style() { global $wpdb; global $sola_nl_style_table; global $sola_nl_css_options_table; global $sola_nl_style_elements_table; global $sola_nl_themes_table; $letter_1 = sola_nl_default_letter(); $styles = sola_nl_default_styles_array(); $style_version = 1.1; $wpdb->query($wpdb->prepare("\n INSERT IGNORE INTO `{$sola_nl_themes_table}` (`theme_id`, `theme_name`, `theme_html`, `styles`, `version`) VALUES\n (%d, %s, %s, %s, %d)\n\t\t", 1, 'single column', $letter_1, $styles, $style_version)); $results = $wpdb->get_row("SELECT * FROM `{$sola_nl_themes_table}` WHERE `theme_id` = 1"); if ($results->version != $style_version) { $wpdb->query("UPDATE `{$sola_nl_themes_table}` SET `styles` = '{$styles}', `theme_html` = '{$letter_1}', `version` = '{$style_version}' WHERE `theme_id` = 1"); } $sql = "INSERT IGNORE INTO `{$sola_nl_css_options_table}` (`id`, `css_name`, `name`, `value`) VALUES\n ('1', 'font-family', 'Georgia', 'Georgia, serif'),\n ('2', 'font-family', 'Palatino Linotype', '\"Palatino Linotype\", \"Book Antiqua\", Palatino, serif'),\n ('3', 'font-family', 'Times New Roman', '\"Times New Roman\", Times, serif'),\n ('4', 'font-family', 'Arial', 'Arial, Helvetica, sans-serif'),\n ('5', 'font-family', 'Arial Black', '\"Arial Black\", Gadget, sans-serif'),\n ('6', 'font-family', 'Comic Sans MS', '\"Comic Sans MS\", cursive, sans-serif'),\n ('7', 'font-family', 'Impact', 'Impact, Charcoal, sans-serif'),\n ('8', 'font-family', 'Lucida Sans Unicode', '\"Lucida Sans Unicode\", \"Lucida Grande\", sans-serif'),\n ('9', 'font-family', 'Tahoma', 'Tahoma, Geneva, sans-serif'),\n ('10', 'font-family', 'Trebuchet MS', '\"Trebuchet MS\", Helvetica, sans-serif'),\n ('11', 'font-family', 'Verdana', 'Verdana, Geneva, sans-serif'),\n ('12', 'font-family', 'Courier New', '\"Courier New\", Courier, monospace'),\n ('13', 'font-family', 'Lucida Console', '\"Lucida Console\" Monaco, monospace'),\n ('14', 'font-family', 'Inherit', 'inherit'),\n ('15', 'border-style', 'Dashed', 'dashed'),\n ('16', 'border-style', 'Dotted', 'dotted'),\n ('17', 'border-style', 'Double', 'double'),\n ('18', 'border-style', 'Groove', 'groove'),\n ('19', 'border-style', 'Hidden', 'hidden'),\n ('20', 'border-style', 'Inset', 'inset'),\n ('21', 'border-style', 'None', 'none'),\n ('22', 'border-style', 'Outset', 'outset'),\n ('23', 'border-style', 'Ridge', 'ridge'),\n ('24', 'border-style', 'Solid', 'solid'),\n ('25', 'font-style', 'Inherit', 'inherit'),\n ('26', 'font-style', 'Initial', 'initial'),\n ('27', 'font-style', 'Italic', 'italic'),\n ('28', 'font-style', 'Normal', 'normal'),\n ('29', 'font-weight', 'Bold', 'bold'),\n ('30', 'font-weight', 'Bolder', 'bolder'),\n ('31', 'font-weight', 'Inherit', 'inherit'),\n ('32', 'font-weight', 'Initial', 'initial'),\n ('33', 'font-weight', 'Lighter', 'lighter'),\n ('34', 'font-weight', 'Normal', 'normal'),\n ('35', 'text-align', 'Center', 'center'),\n ('36', 'text-align', 'Inherit', 'inherit'),\n ('37', 'text-align', 'Justify', 'justify'),\n ('38', 'text-align', 'Left', 'left'),\n ('39', 'text-align', 'Right', 'right'),\n ('40', 'text-decoration', 'Inherit', 'inherit'),\n ('41', 'text-decoration', 'Initial', 'initial'),\n ('42', 'text-decoration', 'Line-Through', 'line-through'),\n ('43', 'text-decoration', 'None', 'none'),\n ('44', 'text-decoration', 'Overline', 'overline'),\n ('45', 'text-decoration', 'Underline', 'underline'),\n ('46', 'border-right-style', 'Dashed', 'dashed'),\n ('47', 'border-right-style', 'Dotted', 'dotted'),\n ('48', 'border-right-style', 'Double', 'double'),\n ('49', 'border-right-style', 'Groove', 'groove'),\n ('50', 'border-right-style', 'Hidden', 'hidden'),\n ('51', 'border-right-style', 'Inset', 'inset'),\n ('52', 'border-right-style', 'None', 'none'),\n ('53', 'border-right-style', 'Outset', 'outset'),\n ('54', 'border-right-style', 'Ridge', 'ridge'),\n ('55', 'border-right-style', 'Solid', 'solid');\n "; $wpdb->query($sql); }