. */ //add all in one adsense menu to the wordpress options menu function ai_add_options(){ if(function_exists('add_options_page')){ add_options_page('Adsense', 'Adsense', 9, basename(__FILE__), 'ai_options_subpanel'); } } //validate options switch($_POST['action']){ case 'Save': update_option('ai_network', $_POST['ai_network']); if(isset($_POST['betatest'])) update_option('ai_betatest', "yes"); else delete_option('ai_betatest'); if(isset($_POST['notme'])) update_option('ai_notme', "yes"); else delete_option('ai_notme'); if(isset($_POST['googtestmode'])) update_option('ai_googtestmode', "yes"); else delete_option('ai_googtestmode'); if(isset($_POST['dontshowinstr'])) update_option('ai_dontshowinstr', "yes"); if(isset($_POST['showinstr'])) update_option('ai_dontshowinstr', "no"); update_option('ai_color_border', $_POST['ai_color_border']); update_option('ai_color_link', $_POST['ai_color_link']); update_option('ai_color_bg', $_POST['ai_color_bg']); update_option('ai_color_text', $_POST['ai_color_text']); update_option('ai_color_url', $_POST['ai_color_url']); update_option('ai_lra', $_POST['ai_pos']); update_option('ai_nads', $_POST['nads']); update_option('ai_nadspp', $_POST['nadspp']); update_option('ai_text_only', false); update_option('ai_client', $_POST['ai_client']); update_option('ai_channel', $_POST['ai_channel']); update_option('ai_client_ypn', $_POST['ai_client_ypn']); update_option('ai_channel_ypn', $_POST['ai_channel_ypn']); if($_POST['234x60'] == "on") update_option('ai_234x60', "checked=on"); else update_option('ai_234x60', ""); if($_POST['200x200'] == "on") update_option('ai_200x200', "checked=on"); else update_option('ai_200x200', ""); if($_POST['125x125'] == "on") update_option('ai_125x125', "checked=on"); else update_option('ai_125x125', ""); if($_POST['180x150'] == "on") update_option('ai_180x150', "checked=on"); else update_option('ai_180x150', ""); if($_POST['120x240'] == "on") update_option('ai_120x240', "checked=on"); else update_option('ai_120x240', ""); if($_POST['300x250'] == "on") update_option('ai_300x250', "checked=on"); else update_option('ai_300x250', ""); if($_POST['250x250'] == "on") update_option('ai_250x250', "checked=on"); else update_option('ai_250x250', ""); if($_POST['336x280'] == "on") update_option('ai_336x280', "checked=on"); else update_option('ai_336x280', ""); if($_POST['468x60'] == "on") update_option('ai_468x60', "checked=on"); else update_option('ai_468x60', ""); if($_POST['home'] == "on") update_option('ai_home', "checked=on"); else update_option('ai_home', ""); if($_POST['page'] == "on") update_option('ai_page', "checked=on"); else update_option('ai_page', ""); if($_POST['post'] == "on") update_option('ai_post', "checked=on"); else update_option('ai_post', ""); if($_POST['cat'] == "on") update_option('ai_cat', "checked=on"); else update_option('ai_cat', ""); if($_POST['archive'] == "on") update_option('ai_archive', "checked=on"); else update_option('ai_archive', ""); break; } //user enter required data here function ai_options_subpanel(){ if(get_option("ai_network", "") == "") update_option("ai_network", "Adsense"); $ad_client = get_option('ai_client'); $ad_channel = get_option('ai_channel'); $ad_client_ypn = get_option('ai_client_ypn'); $ad_channel_ypn = get_option('ai_channel_ypn'); $adnetwork = get_option("ai_network", "Adsense"); $lra = get_option('ai_lra'); $nads = get_option('ai_nads'); $nadspp = get_option('ai_nadspp'); $text_only = get_option('ai_text_only'); $ai_color_border = get_option('ai_color_border'); $ai_color_link = get_option('ai_color_link'); $ai_color_bg = get_option('ai_color_bg'); $ai_color_text = get_option('ai_color_text'); $ai_color_url = get_option('ai_color_url'); ?>
$half) array_pop($poses); $pickme = $poses[rand(0, sizeof($poses)-1)]; $replacewith = ai_pickalign(get_option('ai_lra')); $replacewith .= ai_genadcode()."