/i', '', $text); return $text; } function sanitize_num($text) { $text = stripslashes($text); $text = preg_replace('/[^0-9]/', '', $text); return $text; } function tech_font($font) { switch ($font){ case "Trebuchet MS": $font = '"Trebuchet MS", Helvetica'; break; case "Tahoma": $font = $font . ', Geneva'; break; case "Times New Roman": $font = '"Times New Roman", Times'; break; case "Lucida Sans Unicode": $font = '"Lucida Sans Unicode" , "Lucida Grande"'; break; case "Impact": $font = 'Impact, Charcoal'; break; } return $font; } function tech_color_verify($color){ if ($color){ if ($color[0] != '#') $color = '#'.$color; return $color; } } $tech['blog_title_display'] = ''; $tech['blog_title_cursor'] = ''; $tech['header_align'] = strtolower($tech['header_align']); $bg_image_repeat = explode(',', $tech['bg_image_repeat']); $tech_bg_repeat = ""; if (in_array("X" , $bg_image_repeat)) { $tech_bg_repeat = "-x"; } if (in_array("Y" , $bg_image_repeat)) { if ($tech_bg_repeat == "-x"){ $tech_bg_repeat = ""; } else { $tech_bg_repeat = "-y"; } } $content_bg_image_repeat = explode(',', $tech['content_bg_image_repeat']); $tech_content_bg_repeat = ""; if (in_array("X" , $content_bg_image_repeat)) { $tech_content_bg_repeat = "-x"; } if (in_array("Y" , $content_bg_image_repeat)) { if ($tech_content_bg_repeat == "-x"){ $tech_content_bg_repeat = ""; } else { $tech_content_bg_repeat = "-y"; } } if ($tech['test'] != 'set'){ $tech['column'] = 3; $tech['sidebar_pos'] = 'Sidebar - Content - Sidebar'; $tech['header'] = 'Grunge'; $tech['header_font'] = 'Verdana'; $tech['body_font'] = 'Lucida Sans Unicode'; $tech['default_font'] = 'Lucida Sans Unicode'; $tech['color_scheme'] = 'Blue'; $tech['main_column_width'] = 0; $tech['sidebar_width'] = 0; $tech['page_width'] = 0; $tech['body_font_size'] = 10; $tech['blog_title_align'] = 'float:left;margin-left:10px'; } if ($tech['page_type'] == 'Fixed Width'){$tech['sign'] = 'px';} else {$tech['sign'] = '%';} if ($tech['page_width'] == 0 ) { $tech['page_width'] = '95'; $tech['sign'] = '%';} if ($tech['page_type'] == 'Fluid Width' && $tech['page_width'] > 101) $tech['page_width'] = '100'; if ($tech['blog_title'] == 'No') $tech['blog_title_display'] = 'display:none'; if ($tech['blog_title_text'] == 'Single Post Title') $tech['blog_title_cursor'] = 'cursor:default;'; $tech_blog_title_align_check =""; $tech_nav_align_check =""; switch ($tech['blog_title_align']){ case "Left": $tech['blog_title_align'] = 'float:left;margin-left:10px'; break; case "Right": $tech['blog_title_align'] = 'float:right;margin-right:10px'; break; case "Center": $tech['blog_title_align'] = 'float:left;position:relative;left:-50%'; $tech_blog_title_align_check = "Center"; break; } switch ($tech['nav_align']){ case "Center": $tech['nav_align'] = 'float:left;position:relative;left:-50%'; $tech_nav_align_check = "Center"; break; } $tech['default_font'] = tech_font($tech['default_font']); $tech['body_font'] = tech_font($tech['body_font']); $tech['header_font'] = tech_font($tech['header_font']); $tech['nav_font'] = tech_font($tech['nav_font']); $cufon_header_size = $tech['main_heading_font_size'] ; $cufon_sidebar_size = "1.6"; $tech_color_scheme = $tech['color_scheme']; $tech_default_color = array( "Blue" => array ('#A0B3C2','#A0B3C2','#597EAA','#114477','#2C4353','#2C4353','#E3E3E3','#E3E3E3','#F7F7F7'), "Khaki" => array ('#c7c69a','#c7c69a','#6E0405','#B53839','#2C4353','#2C4353','#E3E3E3','#E3E3E3','#F7F7F7'), "Red" => array ('#AB2222','#AB2222','#D33535','#B53839','#2C4353','#2C4353','#E3E3E3','#E3E3E3','#F7F7F7'), "Grunge" => array ('#534E3E','#534E3E','#78BFBF','#78BFBF','#2C4353','#2C4353','#E3E3E3','#E3E3E3','#F7F7F7') ); $tech_color_names = array('Blue','Khaki','Red','Grunge'); if (in_array($tech['color_scheme'], $tech_color_names)){ $tech_bg_color = $tech_default_color[$tech_color_scheme][0]; $tech_acc_color = $tech_default_color[$tech_color_scheme][1]; $tech_link_color = $tech_default_color[$tech_color_scheme][2]; $tech_link_hov_color = $tech_default_color[$tech_color_scheme][3]; $tech_visit_link_color = $tech_default_color[$tech_color_scheme][4]; $tech_text_color = $tech_default_color[$tech_color_scheme][5]; $tech_nav_bg_color = $tech_default_color[$tech_color_scheme][6]; $tech_post_bg_color = $tech_default_color[$tech_color_scheme][7]; $tech_content_bg_color =$tech_default_color[$tech_color_scheme][8]; } elseif ($tech['color_scheme'] == 'Custom 1'){ $tech_bg_color = tech_color_verify($tech['cust_bg_color1']); $tech_acc_color = tech_color_verify($tech['cust_acc_color1']); $tech_link_color = tech_color_verify($tech['cust_link_color1']); $tech_link_hov_color = tech_color_verify($tech['cust_link_hov_color1']); $tech_visit_link_color = tech_color_verify($tech['cust_link_visit_color1']); $tech_text_color = tech_color_verify($tech['cust_text_color1']); $tech_nav_bg_color = tech_color_verify($tech['cust_nav_bg_color1']); $tech_post_bg_color = tech_color_verify($tech['cust_post_bg_color1']); $tech_content_bg_color =tech_color_verify($tech['cust_content_bg_color1']); } else { $tech_bg_color = tech_color_verify($tech['cust_bg_color2']); $tech_acc_color = tech_color_verify($tech['cust_acc_color2']); $tech_link_color = tech_color_verify($tech['cust_link_color2']); $tech_link_hov_color = tech_color_verify($tech['cust_link_hov_color2']); $tech_visit_link_color = tech_color_verify($tech['cust_link_visit_color2']); $tech_text_color = tech_color_verify($tech['cust_text_color2']); $tech_nav_bg_color = tech_color_verify($tech['cust_nav_bg_color2']); $tech_post_bg_color = tech_color_verify($tech['cust_post_bg_color2']); $tech_content_bg_color =tech_color_verify($tech['cust_content_bg_color2']); } $tech_sidebar_h3_font_size = $tech['side_heading_font_size'] - .4; $tech_wp_content = WP_CONTENT_URL; $header_folder = WP_CONTENT_DIR. "/techozoic/images/headers"; if (!file_exists($header_folder)){ $home = get_bloginfo('template_directory'); } else { $home = WP_CONTENT_URL ."/techozoic"; } echo <<