예제 #1
0
 function generateImage($token)
 {
     $fig = new phpFiglet();
     if (!$fig->loadFont('saf/lib/Ext/phpfiglet/fonts/' . $this->font)) {
         $this->error = 'Failed to load font file.';
         return false;
     }
     return $fig->fetch($token);
 }
예제 #2
0
 function get_ascii($type, $bigtext, $smalltext, $font)
 {
     $line = '';
     $options = $this->get_options();
     // check cache
     if ($options[$type]['bigtext'] == $bigtext && $options[$type]['font'] == $font) {
         $line = $options[$type]['line'];
     } else {
         if ($bigtext) {
             require "phpfiglet_class.php";
             $phpFiglet = new phpFiglet();
             if ($phpFiglet->loadFont(dirname(__FILE__) . '/fonts/' . $font)) {
                 $line = $phpFiglet->fetch($bigtext);
             } else {
                 $line = "Could not load font file";
             }
             $options[$type]['bigtext'] = $bigtext;
             $options[$type]['font'] = $font;
             $options[$type]['line'] = $line;
             update_option($this->DB_option, $options);
         }
     }
     return $line;
 }
예제 #3
0
$post_inst = new post();
$phpFiglet = new phpFiglet();
$inst_post = new mybb_style();
$htmlinst = new html();
$admin = new adminclass();
$util = new utilities();
$cook = new cookie();
/*
 * Check if sqlite database file is not existed
 * If yes, then redirect to create.php
 */
if (sqlite_file == '' || !file_exists(sqlite_file)) {
    $htmlinst->change_location("./create.php");
}
$_SERVER['REMOTE_ADDR'] = $util->get_client_ip($_SERVER);
$phpFiglet->loadFont("./figlet/spliff.flf");
$db = new SQLite3(sqlite_file, SQLITE3_OPEN_READWRITE);
$title = $db->query("SELECT Name, Value FROM Options WHERE Name='title';");
$title = $title->fetchArray(SQLITE3_ASSOC);
/*
 * Check if user have old_skkooll cookie
 * If yes, then give appropriate privilege to user through cookie::check_cookie function
 */
if (isset($_COOKIE['old_skkooll'])) {
    $cook_book = $cook->check_cookie($_COOKIE['old_skkooll'], random_str, $db);
}
?>
        <link rel="stylesheet" href="./style.css" />
        <script type="text/javascript" src="./js/jquery.min.js"></script>
        <script type='text/javascript' src="./js/jquery.imagefit-0.2.js"></script>
        <script type="text/javascript" src="./js/jstz.min.js"></script>
예제 #4
0
<html>
<body>
<pre>
<?php 
/*        _         _____  _       _       _
 *   ___ | |_  ___ |   __||_| ___ | | ___ | |_
 *  | . ||   || . ||   __|| || . || || -_||  _|
 *  |  _||_|_||  _||__|   |_||_  ||_||___||_|
 *  |_|       |_|            |___|
 *
 *  Usage example script
 *
 */
require "phpfiglet_class.php";
$phpFiglet = new phpFiglet();
if ($phpFiglet->loadFont("fonts/standard.flf")) {
    $phpFiglet->display("phpFiglet Rulez!");
} else {
    trigger_error("Could not load font file");
}
?>
<pre>
</body>
</html>
예제 #5
0
 *   ___ | |_  ___ |   __||_| ___ | | ___ | |_
 *  | . ||   || . ||   __|| || . || || -_||  _|
 *  |  _||_|_||  _||__|   |_||_  ||_||___||_|
 *  |_|       |_|            |___|
 *
 *  This script opens the supplied font directory and
 *  shows a line of text in every available font
 *
 */
require "phpfiglet_class.php";
$out = "";
$phpFiglet = new phpFiglet();
if ($handle = opendir('fonts')) {
    while (false !== ($file = readdir($handle))) {
        if ($file != "." && $file != "..") {
            if ($phpFiglet->loadFont("fonts/" . $file)) {
                $out .= $file . "\n";
                $out .= $phpFiglet->fetch("Hello World");
                $out .= "\n\n";
            }
        }
    }
    closedir($handle);
}
?>
<html>
<body>
<pre>
<?php 
print $out;
?>