folders, $folders); } /** * Applies the configuration of the plugin * @var array $config The config that is to be edited * @return array The new config */ public function applyConfig($config) { $config['tabs'] = array( 0 => array( 'Settings', 'tabs__settings_withinboredom'), 1 => array('About', 'tabs__about_withinboredom'), 2 => array('Support', 'tabs__support_withinboredom'), ); $config['help'] = array( // The tab to display on '0' => array( // The title content of the help menu 0 => array('Overview', "Basic settings for the Abundatrade Calculator."), 1 => array('Help', 'Enter your affiliate id and the location of your thank you page') ) ); $config['config'] = array( 'settings' => true, 'page_title' => 'Abundatrade', 'button_title' => 'Abundatrade', 'slug' => 'abundatrade', 'shortcodes' => array( 'abundatrade' ), ); return $config; } public function validate_required($name) { if(isset($_REQUEST[$name]) && $_REQUEST[$name] == "") { return false; } return true; } public function get_value($name) { if(isset($_REQUEST[$name])) { return $_REQUEST[$name]; } return ""; } public function gadget($atts) { $closediv = ""; $gad_cat = ''; $red = "style='border: 1px solid red'"; $all_valid = false; $show_all = "style='display:none'"; preg_match('/MSIE (.*?);/', $_SERVER['HTTP_USER_AGENT'], $matches); $use_labels = false; if (count($matches)>1){ //Then we're using IE $version = $matches[1]; $use_labels = true; switch(true){ case ($version<=8): //IE 8 or under! $use_labels = true; break; case ($version==9): //IE9! $use_labels = true; break; case ($version == 10): $use_labels = false; default: //You get the idea } } if (isset($atts['gad_cat'])) { $this->export = array('gad_cat' => $atts['gad_cat']); } if(isset($_REQUEST['gad_cat'])) { if ($_REQUEST['gad_cat'] == -1) { $gad_cat = $red; } $all_valid = true; } if(!$this->validate_required('my_name')) { $name = $red; $all_valid = false; } else { } if(!$this->validate_required('email')) { $email = $red; $all_valid = false; } else { } if(!$this->validate_required('address_street')) { $address_street = $red; $all_valid = false; } else { } if(!$this->validate_required('address_city')) { $address_city = $red; $all_valid = false; } else { } if(!$this->validate_required('address_state')) { $address_state = $red; $all_valid = false; } else { } if(!$this->validate_required('address_zip')) { $address_zip = $red; $all_valid = false; } else { } $dvd = array( '-1' => 'Select Your Free CD and DVD', '-2' => 'No Thank You', '-3' => '-- DVDs --', 'Austin Powers in Goldmember' => 'Austin Powers in Goldmember', 'Barbershop 2: Back in Business (Special Edition)' => 'Barbershop 2: Back in Business (Special Edition)', 'Batman Begins (Single-Disc Widescreen Edition)' => 'Batman Begins (Single-Disc Widescreen Edition)', 'Superman Returns (Widescreen Edition)' => 'Superman Returns (Widescreen Edition)', 'King Kong (Widescreen Edition)' => 'King Kong (Widescreen Edition)', 'The Clique' => 'The Clique', 'Blade' => 'Blade', 'The Lord of the Rings: The Fellowship of the Ring (Two-Disc Widescreen Theatrical Edition)' => 'The Lord of the Rings: The Fellowship of the Ring (Two-Disc Widescreen Theatrical Edition)', 'The Matrix Reloaded (Full Screen Edition)' => 'The Matrix Reloaded (Full Screen Edition)', 'Welcome to Nanalan - Favorites' => 'Welcome to Nanalan - Favorites', '-4' => '-- CDs --', 'Christina Aguilera -- Christina Aguilera' => 'Christina Aguilera -- Christina Aguilera', 'Our Time in Eden -- 10,000 Maniacs' => 'Our Time in Eden -- 10,000 Maniacs', 'Backstreet Boys -- Backstreet Boys' => 'Backstreet Boys -- Backstreet Boys', 'Rock Spectacle -- Barenaked Ladies' => 'Rock Spectacle -- Barenaked Ladies', 'Four -- Blues Traveler' => 'Four -- Blues Traveler', 'New Beginning -- Tracy Chapman' => 'New Beginning -- Tracy Chapman', 'Voice of an Angel -- Charlotte Church' => 'Voice of an Angel -- Charlotte Church', 'Recovering the Satellites -- Counting Crows' => 'Recovering the Satellites -- Counting Crows', 'Falling Into You -- Celine Dion' => 'Falling Into You -- Celine Dion', 'Yes I Am -- Melissa Etheridge' => 'Yes I Am -- Melissa Etheridge', 'New Miserable Experience -- Gin Blossoms' => 'New Miserable Experience -- Gin Blossoms', 'Cracked Rear View -- Hootie & The Blowfish' => 'Cracked Rear View -- Hootie & The Blowfish', 'Pieces of You -- Jewel' => 'Pieces of You -- Jewel', 'Ingenue -- KD Lang' => 'Ingenue -- KD Lang', 'Why I Sing the Blues -- BB King' => 'Why I Sing the Blues -- BB King', 'Throwing Copper -- Live.' => 'Throwing Copper -- Live.', 'Ray of Light -- Madonna' => 'Ray of Light -- Madonna', 'Jagged Little Pill -- Alanis Morissette' => 'Jagged Little Pill -- Alanis Morissette', 'Monster -- R.E.M.' => 'Monster -- R.E.M.', 'Mirrorball -- Sarah McLachlan' => 'Mirrorball -- Sarah McLachlan', 'Seal -- Seal' => 'Seal -- Seal', 'Titanic: Music from the Motion Picture Soundtrack' => 'Titanic: Music from the Motion Picture Soundtrack', 'Baby One More Time -- Britney Spears' => 'Baby One More Time -- Britney Spears', 'The Woman in Me -- Shania Twain' => 'The Woman in Me -- Shania Twain', 'Motown Love Songs -- Various Artists' => 'Motown Love Songs -- Various Artists', 'Reggae Hits, Vol. 36 -- Various Artists' => 'Reggae Hits, Vol. 36 -- Various Artists' ); if ($all_valid) { $display = "
Please wait while we finalize your quote