Plugin Directory

Changeset 401904


Ignore:
Timestamp:
06/28/2011 12:56:09 AM (15 years ago)
Author:
ppatux
Message:

fixed update options

File:
1 edited

Legend:

Unmodified
Added
Removed
  • ipv6detector/trunk/ipv6detector.php

    r401902 r401904  
    55  Plugin URI: http://patux.cl/ipv6detector
    66  Description: Just a simple plugin to detect if a visitor is using ipv6 or not.
    7   Version: 1.2
     7  Version: 1.1
    88  Author: Patux
    99  Author URI: http://patux.cl
     
    1818    add_option("hits_6", 0);
    1919    add_option("hits_4", 0);
    20     add_option('whois_url','http://log.patux.cl/whois.php?obj=');
     20    add_option("whois_url","http://log.patux.cl/whois.php?obj=");
     21    add_option("ipv6detector_v4_msg","Still using IPv4?");
     22    add_option("ipv6detector_v6_msg","Cool! you have got IPv6.");
    2123}
    2224
     
    6264        update_option('ipv6detector_v4_msg', $_POST['v4_msg']);
    6365    }
    64     $url = get_option('ipv6detector_v4_msg');
    65     echo "Message to display when user have IPv4 <input type='text' name='v4_msg' value='Still using IPv4?'/><br />\n";
     66    $v4_msg = get_option('ipv6detector_v4_msg');
     67    echo "Message to display when user have IPv4 <input type='text' name='v4_msg' value='".$v4_msg."'/><br />\n";
    6668
    6769    // ipv6 message
     
    6971        update_option('ipv6detector_v6_msg', $_POST['v6_msg']);
    7072    }
    71     $url = get_option('ipv6detector_v6_msg');
    72     echo "Message to display when user have IPv6 <input type='text' name='v6_msg' value='Cool! you have got Ipv6'/><br />\n";
     73    $v6_msg = get_option('ipv6detector_v6_msg');
     74    echo "Message to display when user have IPv6 <input type='text' name='v6_msg' value='".$v6_msg."'/><br />\n";
    7375
    7476
     
    7779        update_option('hits_6', 0);
    7880        update_option('hits_4', 0);
     81        delete_option('whois_url', 0);
     82        delete_option('ipv6detector_v6_msg', 0);
     83        delete_option('ipv6detector_v4_msg', 0);
    7984    }
    8085    echo "Reset hit count and config <input type='checkbox' name='rhit' value='1'/><br />\n";
Note: See TracChangeset for help on using the changeset viewer.