<?php
/*
EP_Tools (Eros Pedrini Tools) - Atom Fix GUI (Ver 1.3)
This is GUI for EP_Tools Atom Fix plugin.

by Eros Pedrini


Copyright 2008  Eros Pedrini  (email : contezero74@yahoo.it)


This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
*/

define( 'EP_TOOLS_GUI_DIR', get_option('ep_tools_plugins_gui_dir') );


require_once(EP_TOOLS_GUI_DIR . '/ep_tools_plugin_gui_class.php');
require_once(EP_TOOLS_GUI_DIR . '/lib/wordpress_pre2.6.inc');


class ep_tools_atom_fix_gui extends ep_tools_plugin_gui_class {
    function ep_tools_atom_fix_gui() {}
    
    function printTitle() {
        echo 'Atom validation problem Fix';
    }
    
    function printGUI() {
        echo "\n<p>\n";
        echo "\t<label>\n";
        echo "\t\t<input name=\"ep_tools_opt_atom_fix\" id=\"ep_tools_opt_atom_fix\" value=\"true\" type=\"checkbox\" ";
        
        if ( get_option('ep_tools_plugin_Atom_Fix_Enable') == 'true' ) {
            echo ' checked="checked" ';
        }
        
        echo "/>\n";
        
        echo 'Fix atom feed problem related with ' . htmlentities('<thr:total>') . " tag (RFC 4685)\n";
        
        echo "\t</label>\n";
        echo "</p>\n\n";
    }
    
    function updateConfig() {
        update_option('ep_tools_plugin_Atom_Fix_Enable', $_POST['ep_tools_opt_atom_fix']);
    }
}

?>
