code:
    <title>314chan Banners</title>

    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />

    <link rel="shortcut icon" href="/favicon.ico" />

    <link rel="stylesheet" type="text/css" href="/css/img_globals.css">

    <link rel="stylesheet" type="text/css" href="/css/front.css" />

    <link rel="stylesheet" type="text/css" href="/css/site_front.css" />

    <link rel="stylesheet" type="text/css" href="/css/site_global.css">

    <link rel="stylesheet" type="text/css" href="/css/futaba.css" title="futaba">

<?php
    ini_set('display_errors', 1);
$allowedExts = array("jpg", "jpeg", "gif", "png");

$extension = end(explode(".", $_FILES["file"]["name"]));

// Image size

$test = getimagesize($_FILES["file"]["tmp_name"]);

$width = $test[0];

$height = $test[1];

// end image size

if ((($_FILES["file"]["type"] == "image/gif") || ($_FILES["file"]["type"] == "image/jpeg") || ($_FILES["file"]["type"] == "image/jpg") || ($_FILES["file"]["type"] == "image/pjpeg") || ($_FILES["file"]["type"] == "image/x-png") || ($_FILES["file"]["type"] == "image/png")) && in_array($extension, $allowedExts)) {

    if ($_FILES["file"]["error"] > 0) {

        echo "Return Code: " . $_FILES["file"]["error"] . "
";

        die();

    } else {

        if (file_exists("upload/" . $_FILES["file"]["name"]) || file_exists($_FILES["file"]["name"])) {

            echo $_FILES["file"]["name"] . " already exists. ";

        }else {

            move_uploaded_file($_FILES["file"]["tmp_name"], "" . $_FILES["file"]["name"]);

            echo "
Thanks! '" . $_FILES["file"]["name"] . "' has been uploaded.
";

        }

    }

} else {

    echo "Invalid file";

}


code:
<?php

if (!file_exists("./config.php")) {

    header("Location: ./install.php");

}

require "config.php";

require "inc/mitsuba.php";

$conn = new mysqli($db_host, $db_username, $db_password, $db_database);

$mitsuba = new Mitsuba($conn);

$mitsuba->common->banMessage("%");

$mitsuba->common->warningMessage();

?>

NOT BANNED

license: mit


code:
    <title>314chan Banners</title>

    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />

    <link rel="shortcut icon" href="/favicon.ico" />

    <link rel="stylesheet" type="text/css" href="/css/img_globals.css">

    <link rel="stylesheet" type="text/css" href="/css/front.css" />

    <link rel="stylesheet" type="text/css" href="/css/site_front.css" />

    <link rel="stylesheet" type="text/css" href="/css/site_global.css">

    <link rel="stylesheet" type="text/css" href="/css/futaba.css" title="futaba">

Upload a banner for review:

<form action="upload.php" method="post"

enctype="multipart/form-data">

File:

<input type="file" name="file" id="file">

<input type="submit" name="submit" value="Submit">

</form>

Banners currently in rotation:

<?php

error_reporting();

$files = glob("*.{png,jpg,jpeg,gif}", GLOB_BRACE);

// $files = glob("*.gif");

for ($i = 1;$i < count($files);$i++) {

    $num = $files[$i];

    echo '' . "  ";

}

?>


code:
<?php

/*

By Matt Mullenweg > http://photomatt.net

Inspired by Dan Benjamin > http://hiveware.com/imagerotator.php

Latest version always at:

http://photomatt.net/scripts/randomimage

*/

// Make this the relative path to the images, like "../img" or "random/images/".

// If the images are in the same directory, leave it blank.

$folder = './img/';

// Space seperated list of extensions, you probably won't have to change this.

$exts = 'jpg jpeg png gif';

$files = array();

$i = - 1; // Initialize some variables

if ('' == $folder) { $folder = './';
}

$handle = opendir($folder);

$exts = explode(' ', $exts);

while (false !== ($file = readdir($handle))) {

    foreach ($exts as $ext) { // for each extension check the extension

        if (preg_match('/\.' . $ext . '$/i', $file, $test)) { // faster than ereg, case insensitive

            $files[] = $file; // it's good

            ++$i;

        }

    }

}

closedir($handle); // We're not using it anymore

mt_srand((double)microtime() * 1000000); // seed for PHP < 4.2

$rand = mt_rand(0, $i); // $i was incremented as we went along

header('Location: ' . $folder . $files[$rand]); // Voila!

?>


code:
    <title>314chan Banners</title>

    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />

    <link rel="shortcut icon" href="/favicon.ico" />

    <link rel="stylesheet" type="text/css" href="/css/img_globals.css">

    <link rel="stylesheet" type="text/css" href="/css/front.css" />

    <link rel="stylesheet" type="text/css" href="/css/site_front.css" />

    <link rel="stylesheet" type="text/css" href="/css/site_global.css">

    <link rel="stylesheet" type="text/css" href="/css/futaba.css" title="futaba">

<?php
    ini_set('display_errors', 1);
$allowedExts = array("jpg", "jpeg", "gif", "png");

$extension = end(explode(".", $_FILES["file"]["name"]));

// Image size

$test = getimagesize($_FILES["file"]["tmp_name"]);

$width = $test[0];

$height = $test[1];

// end image size

if ((($_FILES["file"]["type"] == "image/gif") || ($_FILES["file"]["type"] == "image/jpeg") || ($_FILES["file"]["type"] == "image/jpg") || ($_FILES["file"]["type"] == "image/pjpeg") || ($_FILES["file"]["type"] == "image/x-png") || ($_FILES["file"]["type"] == "image/png")) && in_array($extension, $allowedExts)) {

    if ($_FILES["file"]["error"] > 0) {

        echo "Return Code: " . $_FILES["file"]["error"] . "
";

        die();

    } else {

        if (file_exists("upload/" . $_FILES["file"]["name"]) || file_exists($_FILES["file"]["name"])) {

            echo $_FILES["file"]["name"] . " already exists. ";

        } else if ($width > 300 || $height > 100) {

            echo '
This image is larger than 300x100, right? Fix it.
';

            die();

        } else {

            move_uploaded_file($_FILES["file"]["tmp_name"], "" . $_FILES["file"]["name"]);

            echo "
Thanks! '" . $_FILES["file"]["name"] . "' has been uploaded.
";

        }

    }

} else {

    echo "Invalid file";

}


code:
<?php

/*

    DOWNLOADED FROM http://www.marcofolio.net/

    Check it out for more interesting scripts & downloads

    AUTOMATIC IMAGE ROTATOR

    Version 2.2 - December 4, 2003

    Copyright (c) 2002-2003 Dan P. Benjamin, Automatic, Ltd.

    All Rights Reserved.

    http://www.hiveware.com/imagerotator.php

    http://www.automaticlabs.com/

    DISCLAIMER

    Automatic, Ltd. makes no representations or warranties about

    the suitability of the software, either express or

    implied, including but not limited to the implied

    warranties of merchantability, fitness for a particular

    purpose, or non-infringement. Dan P. Benjamin and Automatic, Ltd.

    shall not be liable for any damages suffered by licensee

    as a result of using, modifying or distributing this

    software or its derivatives.

    ABOUT

    This PHP script will randomly select an image file from a

    folder of images on your webserver.  You can then link to it

    as you would any standard image file and you'll see a random

    image each time you reload.

    When you want to add or remove images from the rotation-pool,

    just add or remove them from the image rotation folder.

    VERSION CHANGES

    Version 1.0

        - Release version

    Version 1.5

        - Tweaked a few boring bugs

    Version 2.0

        - Complete rewrite from the ground-up

        - Made it clearer where to make modifications

        - Made it easier to specify/change the rotation-folder

        - Made it easier to specify/change supported image types

        - Wrote better instructions and info (you're them reading now)

        - Significant speed improvements

        - More error checking

        - Cleaner code (albeit more PHP-specific)

        - Better/faster random number generation and file-type parsing

        - Added a feature where the image to display can be specified

        - Added a cool feature where, if an error occurs (such as no

          images being found in the specified folder) *and* you're

          lucky enough to have the GD libraries compiled into PHP on

          your webserver, we generate a replacement "error image" on

          the fly.

    Version 2.1

        - Updated a potential security flaw when value-matching

          filenames

    Version 2.2

        - Updated a few more potential security issues

        - Optimized the code a bit.

        - Expanded the doc for adding new mime/image types.

        Thanks to faithful ALA reader Justin Greer for

        lots of good tips and solid code contribution!

    INSTRUCTIONS

    1. Modify the $folder setting in the configuration section below.

    2. Add image types if needed (most users can ignore that part).

    3. Upload this file (rotate.php) to your webserver.  I recommend

       uploading it to the same folder as your images.

    4. Link to the file as you would any normal image file, like this:

    5. You can also specify the image to display like this:

        This would specify that an image named "gorilla.jpg" located

        in the image-rotation folder should be displayed.

    That's it, you're done.

*/

/* ------------------------- CONFIGURATION -----------------------

    Set $folder to the full path to the location of your images.

    For example: $folder = '/user/me/example.com/images/';

    If the rotate.php file will be in the same folder as your

    images then you should leave it set to $folder = '.';

*/

$folder = '.';

/*

    Most users can safely ignore this part.  If you're a programmer,

    keep reading, if not, you're done.  Go get some coffee.

    If you'd like to enable additional image types other than

    gif, jpg, and png, add a duplicate line to the section below

    for the new image type.

    Add the new file-type, single-quoted, inside brackets.

    Add the mime-type to be sent to the browser, also single-quoted,

    after the equal sign.

    For example:

    PDF Files:

        $extList['pdf'] = 'application/pdf';

    CSS Files:

        $extList['css'] = 'text/css';

    You can even serve up random HTML files:

        $extList['html'] = 'text/html';

        $extList['htm'] = 'text/html';

    Just be sure your mime-type definition is correct!

*/

$extList = array();

$extList['gif'] = 'image/gif';

$extList['jpg'] = 'image/jpeg';

$extList['jpeg'] = 'image/jpeg';

$extList['png'] = 'image/png';

// You don't need to edit anything after this point.

// --------------------- END CONFIGURATION -----------------------

$img = null;
if (substr($folder, -1) != '/') {
    $folder = $folder . '/';
}
if (isset($_GET['img'])) {
    $imageInfo = pathinfo($_GET['img']);
    if (isset($extList[strtolower($imageInfo['extension']) ]) && file_exists($folder . $imageInfo['basename'])) {
        $img = $folder . $imageInfo['basename'];
    }
} else {
    $fileList = array();
    $handle = opendir($folder);
    while (false !== ($file = readdir($handle))) {
        $file_info = pathinfo($file);
        if (isset($extList[@strtolower($file_info['extension']) ])) {
            $fileList[] = $file;
        }
    }
    closedir($handle);
    if (count($fileList) > 0) {
        $imageNumber = time() % count($fileList);
        $img = $folder . $fileList[$imageNumber];
    }
}
if ($img != null) {
    $imageInfo = pathinfo($img);
    $contentType = 'Content-type: ' . $extList[$imageInfo['extension']];
    header($contentType);
    readfile($img);
} else {
    if (function_exists('imagecreate')) {
        header("Content-type: image/png");
        $im = @imagecreate(100, 100) or die("Cannot initialize new GD image stream");
        $background_color = imagecolorallocate($im, 255, 255, 255);
        $text_color = imagecolorallocate($im, 0, 0, 0);
        imagestring($im, 2, 5, 5, "IMAGE ERROR", $text_color);
        imagepng($im);
        imagedestroy($im);
    }
}


code:
<?php

//dont change these, dont even think about adding "bmp" support, it will rape you in the ass

$EXTENSIONS = 'gif,jpg,jpeg,png';

if (isset($_GET["board"]) ? $folder = 'images/' . $_GET["board"] . "/" : $folder = 'images/') {
}

$fileList = array();

$handle = opendir($folder);

while (false !== ($file = readdir($handle))) {

    $file_info = pathinfo($file);

    if ($file != "." && $file != "..") {

        if (strstr($file, ".") && strstr($EXTENSIONS, strtolower($file_info['extension']))) {

            $fileList[] = $file;

        } elseif (!isset($_GET["board"])) {

            $handle2 = opendir($folder . $file);

            while (false !== ($file = readdir($handle2))) {

                $file_info = pathinfo($file);

                if ($file != "." && $file != "..") {

                    if (strstr($file, ".") && strstr($EXTENSIONS, strtolower($file_info['extension']))) {

                        $fileList[] = $file;

                    }

                }

            }

        }

    }

}

closedir($handle);

if (count($fileList) > 0 ? $img = $folder . $fileList[rand(0, count($fileList) - 1) ] : die()) {
}

$imageInfo = pathinfo($img);

header('Content-type: image/' . ($imageInfo['extension'] == 'jpg' ? 'jpeg' : $imageInfo['extension']));

readfile($img);


code:
<!doctype html>

            <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
            <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1.0"/>
            <meta charset="UTF-8">
            <title>314chan</title>
            <link href="css/MIcons.css" rel="stylesheet">
            <link href="css/materialize.css" type="text/css" rel="stylesheet" media="screen,projection"/>
            <link href="css/style.css" type="text/css" rel="stylesheet" media="screen,projection"/>

314chan

Rules

FAQ

News

IRC

Rules

FAQ

News

IRC

                    menu

                  This is a comprehensive list of all bans on 314chan. IPs are masked.

                                <?php
                                /*
                                    vote.php has yet to be written.
                                    for now, it's just collecting info and stuff.
                                */
                                    require "config.php";
                                    require "inc/mitsuba.php";
                                    $conn = new mysqli($db_host, $db_username, $db_password, $db_database);
                                    $haruko = new Mitsuba($conn);
                                    $sql = "SELECT * FROM `bans` LEFT JOIN users ON bans.mod_id=users.id ORDER BY created;";
                                    //$sql = "SELECT DISTINCT strip from `posts`";
                                    //$trip = $conn->query("SELECT * FROM posts WHERE trip IS NOT NULL");

                                if(!$result = $conn->query($sql)) {

                                       echo('
There was an error running the query [' . $conn->error . ']');

                                }else{
                                                        ?>

                                <colgroup>
                                 <col style="width:15%">
                                 <col style="width:15%">
                                 <col style="width:15%">
                                </colgroup>

                                            IP Address
                                            Reason
                                            Created
                                  Expires
                                  Boards
                                  Username
                                  Seen

                                <?php
                                global $securetrip_salt;
                                $logs = 1;
                                while($row = $result->fetch_assoc()){
                                                echo "
";
                                                echo "".crypt($row['ip'], $securetrip_salt)."	";
                                                echo "".mb_strimwidth($row['reason'], 0, 15, "...")."	";
                                                echo "".date("d/m/Y @ H:i", $row['created'])."	";
                                    if ($row['expires'] != 0) {
                                        echo "".date("d/m/Y @ H:i", $row['expires'])."	";
                                    } else {
                                        echo "never	";
                                    }
                                    if ($row['boards']=="%") {
                                        echo "All boards	";
                                    } else {
                                        $banBoards = explode(',', $row['boards']);
                                        if (0.6 * sizeof($_boards) < sizeof($banBoards)) {
                                            echo "All boards excluding: ".implode(', ', array_diff($_boards, $banBoards))."	";
                                        } else {
                                            echo "".implode(', ', $banBoards)."	";
                                        }
                                    }
                                                echo "".$row['username']."	";
                                    if ($row['seen']==1) {
                                        echo "	";
                                    } else {
                                        echo "	";
                                    }
                                                echo "
";
                                }
                                }
            ?>

The Constitutional Monarchy.

314chan would like to be as open as possible. We employ a system in which the boards are controlled by the users, and for the users. I will explain more in depth here

Our Friends

Keychan

Why 314chan?

Permanent U.S. Ownership. We will never sell out to any company.

Head staff that cares. Our staff have never ignored a user in its 7 year run.

No Ads. Parley will never host ads on the server (unless need for money is dire.)

Captcha as a last resort. We will never enable Captchas (unless there are ongoing spam attacks.)

              Site © 2018 314chan

All posts are the responsibility of the original poster.


code:
<!doctype html>

            <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
            <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1.0"/>
            <meta charset="UTF-8">
            <title>314chan</title>
            <link href="css/MIcons.css" rel="stylesheet">
            <link href="css/materialize.css" type="text/css" rel="stylesheet" media="screen,projection"/>
            <link href="css/style.css" type="text/css" rel="stylesheet" media="screen,projection"/>

314chan

Rules

FAQ

News

IRC

Rules

FAQ

News

IRC

                    menu

                  This is a list of all boards on 314chan, excluding the "unlisted" ones.
(do keep note the unlisted boards aren't hidden YET.)

                                    URL
                                    Title

<?php
    $json = file_get_contents("boards.json");
    $jsonIterator = new RecursiveIteratorIterator(
        new RecursiveArrayIterator(json_decode($json, true)),
        RecursiveIteratorIterator::SELF_FIRST
    );

    foreach ($jsonIterator as $key => $val) {
        if(is_array($val)) {
            // echo "$key:\n";
        } else {
            if($key == "is_hidden") {
                continue;
            }else{
                if($key == "uri") {
                    echo "
/".$val."/	 ";
                }
                if($key == "title") {
                    echo "".$val."
";
                }
            }
            // echo "$key => $val\n";
        }
    }
?>

The Constitutional Monarchy.

314chan would like to be as open as possible. We employ a system in which the boards are controlled by the users, and for the users. I will explain more in depth here

Our Friends

76chan

Why 314chan?

Permanent U.S. Ownership. We will never sell out to a Japanese company.

Head staff that cares. Our staff has never ignored a user.

No Ads. Parley will never host ads on the server(unless need for money is dire.)

Captcha as a last resort. We will never enable Captchas (unless there are ongoing spam attacks.)

              Site © 2015 314chan

All posts are the responsibility of the original poster.


code:
<?php
	$engine = "haruko";
	$action = $_GET["action"] ?? '';
if ($action == "puzzle") {
  require("inc/piDentify/captcha.puzzle.php");
} else if ($action == "ident"){
	require("inc/piDentify/captcha.ident.php");
}else {
	die("sorry.");
}
?>


code:
<?php

session_start();

if (isset($_GET['t'])) {

    include "libs/cool-php-captcha/simplecaptcha.php";

    $captcha = new SimpleCaptcha();

    $captcha->lineWidth = 3;

    $captcha->scale = 3;

    $captcha->blur = true;

    if (extension_loaded('imagick')) {

        $captcha->reduceImageColors = true;

        $captcha->useImageMagick = true;

    }

    $captcha->CreateImage();

} elseif (isset($_GET['i'])) {

    echo "";

} else {

    echo "Click here";

}