function mytheme_backup_and_restore_action()
{
    $save_type = $_POST['type'];
    if ($save_type == 'backup_options') {
        $data = array('home' => dtthemes_mytheme_option('home'), 'general' => dtthemes_mytheme_option('general'), 'social' => dtthemes_mytheme_option('social'), 'appearance' => dtthemes_mytheme_option('appearance'), 'integration' => dtthemes_mytheme_option('integration'), 'seo' => dtthemes_mytheme_option('seo'), 'specialty' => dtthemes_mytheme_option('specialty'), 'widgetarea' => dtthemes_mytheme_option("widgetarea"), 'mobile' => dtthemes_mytheme_option('mobile'), 'advance' => dtthemes_mytheme_option('advance'), 'backup' => date('r'));
        update_option("mytheme_backup", $data);
        die('1');
    } elseif ($save_type == 'restore_options') {
        $data = get_option("mytheme_backup");
        update_option(IAMD_THEME_SETTINGS, $data);
        die('1');
    } elseif ($save_type == "import_options") {
        $data = $_POST['data'];
        $data = unserialize(base64_decode($data));
        //100% safe - ignore theme check nag
        update_option(IAMD_THEME_SETTINGS, $data);
        die('1');
    } elseif ($save_type == "reset_options") {
        delete_option(IAMD_THEME_SETTINGS);
        update_option(IAMD_THEME_SETTINGS, dtthemes_mytheme_default_option());
        # To set Default options
        die('1');
    }
}
function dtthemes_myactivationfunction($oldname, $oldtheme = false)
{
    delete_option(IAMD_THEME_SETTINGS);
    update_option(IAMD_THEME_SETTINGS, dtthemes_mytheme_default_option());
}