Esempio n. 1
0
function fmtTripcode($postname)
{
    $trip = tripcode($postname);
    $str = htmlentities($trip[0]);
    if (strlen($trip[1]) > 0) {
        $str .= '<span class="tripcode">!' . htmlentities($trip[1]) . '</span>';
    }
    return $str;
}
Esempio n. 2
0
                         // Latest first
                         if ($resp = $replies->selectWhereAt('post_id', $entry['id'])) {
                             //$resp = array_reverse($resp);
                             if (count($resp) > REPLIES_SHOWN) {
                                 $start_reply = count($resp) - REPLIES_SHOWN;
                                 $end_reply = count($resp);
                                 echo '<i>Hiding ' . $start_reply . ' replies, click Reply to view.</i><br />';
                             } else {
                                 $start_reply = 0;
                                 $end_reply = REPLIES_SHOWN;
                             }
                             for ($i = $start_reply; $i < $end_reply; $i++) {
                                 if (!empty($resp[$i]['id'])) {
                                     $ip = isAdmin() ? $resp[$i]['ip'] : '';
                                     $thumb = empty($resp[$i]['thumb']) ? '<br />' : '<br /> File: <a target="_blank" href="' . $resp[$i]['image'] . '">' . substr($resp[$i]['image'], strlen(IMAGES_FOLDER) + 1) . '</a> - (' . round(filesize($resp[$i]['image']) / 1024) . 'kb - ' . $w . 'x' . $h . ') <br /> <a href="' . $resp[$i]['image'] . '" class="preview"><img border="0" src="' . $resp[$i]['thumb'] . '" align="left" style="margin:5px" alt="" width="' . TH_W . '" height="' . TH_H . '" /></a>';
                                     echo '<div class="box" style="margin-top:6px;"><a name="' . $resp[$i]['id'] . '"></a><span class="subject">' . $resp[$i]['subject'] . '</span> <span class="name"> ' . tripcode($resp[$i]['name']) . '</span> No. <a class="idLink" href="?reply=' . $entry['id'] . '">' . $resp[$i]['id'] . '</a> [<a href="?delete=' . $resp[$i]['id'] . '&amp;w=r">Delete</a>] [<a href="?report&amp;post=' . $entry['id'] . '&amp;reply=' . $resp[$i]['id'] . '">Report</a>] ' . $ip . $thumb . '<span class="comment">' . hacode($resp[$i]['comment']) . '</span></div><br />';
                                 }
                             }
                         }
                         echo '<hr /><br />';
                     }
                     echo '<div class="box"><a href="?page=' . ($n = $page > 1 ? $page - 1 : $page) . '">Previous</a> ';
                     for ($i = 1; $i <= MAX_PAGES; $i++) {
                         echo $show = $i == $page ? '<span style="padding-left: 5px;">[</span> ' . $i . ' ] ' : '<span style="padding-left: 5px;">[</span> <a href="?page=' . $i . '"> ' . $i . '</a> ] ';
                     }
                     echo ' <a style="padding-left: 5px;" href="?page=' . ($n = $page < MAX_PAGES ? $page + 1 : $page) . '">Next</a></div>';
                 }
             }
         }
     }
 }
Esempio n. 3
0
    if (ereg("(#|!)(.*)", $name, $matches)) {
        $cap = $matches[2];
        $cap = strtr($cap, "&amp;", "&");
        //$cap  = strtr($cap, ",", ",");
        $salt = substr($cap . "H.", 1, 2);
        $salt = ereg_replace("[^\\.-z]", ".", $salt);
        $salt = strtr($salt, ":;<=>?@[\\]^_`", "ABCDEFGabcdef");
        return substr(crypt($cap, $salt), -10) . "";
    }
}
function contains($str, $arr)
{
    foreach ($arr as $elem) {
        if (stripos($str, $elem) !== false) {
            // case-insensitive
            return true;
        }
    }
    return false;
}
getWords();
$usefulWords = file_get_contents("tripcode_words.txt");
$usefulWords = explode("\n", $usefulWords);
for ($i = 0;; $i++) {
    // watch out - infinite loop
    $trip = substr(crypt($i), -15);
    $code = tripcode("#" . $trip);
    if (contains($code, $usefulWords)) {
        echo "{$trip} : {$code} \n";
    }
}