<?php global $wpdb, $cformsSettings; ### new global settings container ### a few basic things, always reset during (re)activation $cformsSettings['global']['plugindir'] = basename(dirname(__FILE__)); $cformsSettings['global']['cforms_root'] = get_cf_plugindir() . $cformsSettings['global']['plugindir']; $cformsSettings['global']['tinyURI'] = get_option('siteurl') . '/wp-includes/js/tinymce'; $cformsSettings['global']['cforms_root_dir'] = dirname(__FILE__); $cformsSettings['global']['cforms_IIS'] = strpos(dirname(__FILE__), '\\') !== false ? '\\' : '/'; $cformsSettings['global']['v'] = $localversion; ### Common HTML message information $cformsSettings['global']['cforms_style_title'] = 'font:normal 0.8em Verdana; text-align:right; color:#777; margin:3px 0'; $cformsSettings['global']['cforms_style_table'] = 'background:#F4F5FB; color:#666; font-size:1em; font-family:verdana;'; $cformsSettings['global']['cforms_style_fs_td'] = 'font-size:105%; font-variant:small-caps; letter-spacing:2px; border-bottom:2px solid #E6E8F7; padding:6px 2px 6px 4px; background:#EFF0FA;'; $cformsSettings['global']['cforms_style_fsend_td'] = 'background:#E6E8F7; font-size:0px; line-height:2px; height:2px;'; $cformsSettings['global']['cforms_style_fsendSP_td'] = 'font-size:0px; line-height:2px; height:4px;'; $cformsSettings['global']['cforms_style_key_td'] = 'color:#000; font-size:90%; white-space:nowrap; padding:4px 20px 4px 15px; vertical-align:top;'; $cformsSettings['global']['cforms_style_val_td'] = 'font-size:90%; width:100%;'; $cformsSettings['global']['cforms_style_cforms'] = 'font:normal 10px Arial; color:#777;'; ### check for upgrade pre-9.0 to 9.0 if (check_update()) { return; } ### file upload setINI('form', 'cforms_upload_dir', defined('WP_CONTENT_DIR') ? WP_CONTENT_DIR . '/plugins/' . basename(dirname(__FILE__)) : ABSPATH . 'wp-content/plugins/' . basename(dirname(__FILE__)) . '/attachments'); setINI('form', 'cforms_upload_ext', 'txt,zip,doc,rtf,xls'); setINI('form', 'cforms_upload_size', '1024'); setINI('form', 'cforms_dontclear', false); ### tracking settings setINI('form', 'cforms_rsskey', md5(rand()));
function cforms_scripts_corrupted() { echo '<link rel="stylesheet" type="text/css" href="' . get_cf_plugindir() . basename(dirname(__FILE__)) . '/cforms-admin.css" />' . "\n"; }