Exemple #1
0
 private static function init($allowSmiley, $highlight)
 {
     GWF_BBCode::initSmileys(self::$bbSmileys, self::bbSmileyPath(), $allowSmiley);
     GWF_BBCode::initHighlighter($highlight);
     //		GWF_BB3::initSmileys(self::$bbSmileys, self::bbSmileyPath(), $allowSmiley);
     //		GWF_BB3::initHighlighter($highlight);
 }
Exemple #2
0
 public function renderText($htmlspecial = true, $nl2br = true, $raw = false)
 {
     // 		$back = trim($this->text);
     $back = $this->text;
     if ($htmlspecial) {
         $back = htmlspecialchars($back);
     }
     $back = GWF_BBCode::highlight($back);
     if (!$raw) {
         $back = GWF_BBCode::replaceSmileys($back);
     }
     if ($nl2br) {
         $back = nl2br($back);
     }
     return $back;
 }
Exemple #3
0
if (false === ($chall = WC_Challenge::getByTitle(GWF_PAGE_TITLE))) {
    $chall = WC_Challenge::dummyChallenge(GWF_PAGE_TITLE, 7, 'challenge/time_to_reset2/index.php', false);
}
require_once 'challenge/time_to_reset2/TTR2_Form.include';
require_once 'challenge/time_to_reset2/TTR2_Tokens.include';
# And display the header
$chall->showHeader();
if (isset($_POST['solve'])) {
    ttr2_submit($chall);
}
echo GWF_Website::getDefaultOutput();
$noother = sprintf('<a href="/profile/noother">noother</a>');
echo GWF_Box::box($chall->lang('info', array($noother, 'reset.php', 'index.php?show=source', 'index.php?highlight=christmas')), $chall->lang('title'));
if (Common::getGetString('highlight') === 'christmas') {
    $source = '[PHP title=reset.php]' . trim(file_get_contents('challenge/time_to_reset2/reset.php')) . '[/PHP]';
    echo GWF_Box::box(GWF_BBCode::decode($source));
}
formSolutionbox($chall);
# Print Challenge Footer
echo $chall->copyrightFooter();
# Print end of website
require_once 'challenge/html_foot.php';
function ttr2_submit(WC_Challenge $chall)
{
    if ('' === ($answer = Common::getPostString('answer', ''))) {
        return;
    }
    $sessid = GWF_Session::getSessSID();
    # First check all "custom" solutions
    $solutions = TTR2_Tokens::getSolutions($sessid);
    foreach ($solutions as $solution) {
Exemple #4
0
 public static function initHighlighter(array $highlight)
 {
     self::$highlight = $highlight;
 }