Example #1
0
            return GWF_HTML::error('Smile', array($chall->lang('err_xss')));
        }
        if (!LIVIN_Smile::imageExists($path)) {
            return GWF_HTML::error('Smile', array($chall->lang('err_path')));
        }
        # Like this :)
        LIVIN_Smile::onAddSmiley($pattern, $path);
        return GWF_HTML::message('Smile', array($chall->lang('msg_rule_added')));
    }
}
##################
### ACTION! :) ###
##################
# Weaken security a bit.
GWF_Debug::setDieOnError(false);
$form = new LivinForm($chall);
if (isset($_POST['add'])) {
    # This will stop you from exploiting too much! :p
    require_once 'challenge/livinskull/smile/secure.php';
    echo $form->onAdd($chall);
} elseif (isset($_POST['upload'])) {
    # This will stop you from exploiting too much! :o
    require_once 'challenge/livinskull/smile/secure.php';
    echo $form->onUpload($chall);
}
# Show the form :)
echo $form->getForm($chall)->templateY($chall->lang('ft_add'));
# Show all smileys =)
echo LIVIN_Smile::showAllSmiles($chall);
echo $chall->copyrightFooter();
require_once 'challenge/html_foot.php';