code:
<?php

if (!defined("IN_MOD")) {

    die("Nah, I won't serve that file to you.");

}
if($mitsuba->admin->canBoard("%")) {
    $mitsuba->admin->reqPermission("config.rebuild");

    $config = $mitsuba->config;

    ?>

<?php $mitsuba->admin->ui->startSection($lang['mod/rebuild_cache']); ?>

<form action="?/cache" method="POST">

<?php $mitsuba->admin->ui->getToken($path); ?>

<input type="checkbox" name="links" value=1 /><?php echo $lang['mod/board_links']; ?>

<input type="checkbox" name="boards" value=1 /><?php echo $lang['mod/all_boards']; ?>

<input type="checkbox" name="thumbs" value=1 /><?php echo $lang['mod/thumbnails']; ?>

<input type="checkbox" name="b_json" value=1 /><?php echo $lang['mod/boards_json']; ?>

<input type="checkbox" name="static" value=1 /><?php echo $lang['mod/all_static']; ?>

<input type="submit" value="<?php echo $lang['mod/submit']; ?>">

</form>

<?php $mitsuba->admin->ui->endSection(); ?>

<?php $mitsuba->admin->ui->startSection($lang['mod/rebuild_static']); ?>

<form action="?/static" method="POST">

<?php $mitsuba->admin->ui->getToken($path); ?>

<input type="checkbox" name="frontpage" value=1 /><?php echo $lang['mod/frontpage']; ?> (./<?php echo $config['frontpage_url']; ?>)</input>

<input type="checkbox" name="news" value=1 /><?php echo $lang['mod/news_page']; ?> (./<?php echo $config['news_url']; ?>)</input>

<?php

$result = $conn->query("SELECT * FROM pages;");

while ($row = $result->fetch_assoc())

{

    echo '<input type="checkbox" name="'.$row['name'].'" value=1 />'.$row['title'].' (./'.$row['name'].'.html)
';

}

?>

<input type="submit" value="<?php echo $lang['mod/submit']; ?>">

</form>

<?php $mitsuba->admin->ui->endSection(); ?>
<?php }else{
    echo "
You don't have permissions to rebuild all!
";
}?>


code:
<?php

if (!defined("IN_MOD")) {

    die("Nah, I won't serve that file to you.");

}

$mitsuba->admin->reqPermission("recent.files");

if ((!empty($_GET['max'])) && (is_numeric($_GET['max']))) {

    $max = $_GET['max'];

} else {

    $max = 50;

}

$mitsuba->admin->ui->startSection("");

?>

<?php echo sprintf($lang['mod/recent_n_posts_images'], $max)?>

<?php echo $lang['mod/show_recent_none']; ?>: 50 100 250 500

                            <?php echo $lang['mod/post']; ?>

                            <?php echo $lang['mod/name']; ?>

                            <?php echo $lang['mod/e_mail']; ?>

                            <?php echo $lang['mod/date']; ?>

                            <?php echo $lang['mod/comment']; ?>

                            <?php echo $lang['mod/subject']; ?>

                            <?php echo $lang['mod/delete']; ?>

                        <?php

                        $post_array = array();

                        $num = 0;

                        require_once "libs/jbbcode/Parser.php";

                        $parser = new \JBBCode\Parser();

                        $bbcode = $conn->query("SELECT * FROM bbcodes;");

                        while ($row = $bbcode->fetch_assoc())

                        {

                            $parser->addBBCode($row['name'], $row['code']);

                        }

                        $posts = $conn->query("SELECT * FROM posts WHERE deleted = 0 ORDER BY date DESC LIMIT 0, ".$max);

                        while ($row = $posts->fetch_assoc()){

                            echo "
";

                            echo "";

                            $resto = $row['resto'];

                            $op = 0;

                            if ($row['resto'] == 0) { $resto = $row['id']; $op = 1;
                            }

                            echo "/".$row['board']."/".$row['id']." ";

                            if ($op == 1) { echo "OP";
                            }

                            echo "	";

                            echo "";

                            $trip = "";

                            if (!empty($row['trip'])) {

                                $trip = "!".$row['trip']."";

                            }

                            if (!empty($row['capcode_text'])) {

                                echo ''.$row['name'].''.$trip.' ## '.$row['capcode_text'].'';

                            } else {

                                echo ''.$row['name'].''.$trip;

                            }

                            echo "	";

                            echo "";

                            if (!empty($row['email'])) {

                                echo $row['email'];

                            }else{

                                echo "No email";

                            }

                            echo "	";

                            echo "";

                            echo date("d/m/Y @ H:i", $row['date']);

                            echo "	";

                            echo "";

                            if ($row['raw'] != 1) {

                                if ($row['raw'] == 2) {

                                    $comment = $mitsuba->caching->processComment($row['board'], $row['comment'], $parser, 2, 0);

                                } else {

                                    $comment = $mitsuba->caching->processComment($row['board'], $row['comment'], $parser, 2);

                                }

                            } else {

                                $comment = $row['comment'];

                            }

                            echo $comment;

                            echo "	";

                            echo "";

                            if (!empty($row['subject'])) {
                                echo $row['subject'];
                            }else{
                                echo "No Subject";
                            }

                            echo "	";

                            echo "";

                            if (!empty($row['filename'])) {

                                if ($row['filename'] == "deleted") {

                                    echo "";

                                } elseif (substr($row['filename'], 0, 8) == "spoiler:") {

                                    echo "
Spoiler image";

                                } elseif (substr($row['filename'], 0, 6) == "embed:") {

                                    echo "Embed";

                                } else {
                                  if ((strpos($row['mimetype'],"video/") === 0)) {
                                    $vid_info = pathinfo($row['filename']);
                                    $vid_name = $vid_info["filename"];
                                    $vid_merge = $vid_name.".gif";
                                    echo "";
                                  } else {
                                    echo "";
                                  }

                                    //echo "";

                                }

                            } else {

                                echo "No File";

                            }

                            echo "	";

                            echo "";

                            echo '[D] [F] [B]';

                            echo "	";

                            echo "
";

                        }

                    ?>

<?php $mitsuba->admin->ui->endSection(); ?>

license: mit


code:
<?php

if (!defined("IN_MOD")) {

    die("Nah, I won't serve that file to you.");

}

$mitsuba->admin->reqPermission("recent.posts");

if ((!empty($_GET['max'])) && (is_numeric($_GET['max']))) {

    $max = $_GET['max'];

} else {

    $max = 50;

}

$mitsuba->admin->ui->startSection("");

?>

<?php echo sprintf($lang['mod/recent_n_posts'], $max)?>

<?php echo $lang['mod/show_recent_none']; ?>: 50 100 250 500

                            <?php echo $lang['mod/post']; ?>

                            <?php echo $lang['mod/name']; ?>

                            <?php echo $lang['mod/e_mail']; ?>

                            <?php echo $lang['mod/date']; ?>

                            <?php echo $lang['mod/comment']; ?>

                            <?php echo $lang['mod/subject']; ?>

                            <?php echo $lang['mod/delete']; ?>

                        <?php

                        $post_array = array();

                        $num = 0;

                        require_once "libs/jbbcode/Parser.php";

                        $parser = new \JBBCode\Parser();

                        $bbcode = $conn->query("SELECT * FROM bbcodes;");

                        while ($row = $bbcode->fetch_assoc())

                        {

                            $parser->addBBCode($row['name'], $row['code']);

                        }
                        //if(($mitsuba->admin->canBoard("%"))){
                        $posts = $conn->query("SELECT * FROM posts WHERE deleted = 0 ORDER BY date DESC LIMIT 0, ".$max);
                        //}else{
                        //    $boards = $conn->query("SELECT boards FROM users WHERE username = ")
                        //    $posts = $conn->query("SELECT * FROM posts WHERE deleted = 0 AND board = ".."");
                        //}

                        while ($row = $posts->fetch_assoc()){

                            echo "
";

                            echo "";

                            $resto = $row['resto'];

                            $op = 0;

                            if ($row['resto'] == 0) { $resto = $row['id']; $op = 1;
                            }

                            echo "/".$row['board']."/".$row['id']." ";

                            if ($op == 1) { echo "OP";
                            }

                            echo "	";

                            echo "";

                            $trip = "";

                            if (!empty($row['trip'])) {

                                $trip = "!".$row['trip']."";

                            }

                            if (!empty($row['capcode_text'])) {

                                echo ''.$row['name'].''.$trip.' ## '.$row['capcode_text'].'';

                            } else {

                                echo ''.$row['name'].''.$trip;

                            }

                            echo "	";

                            echo "";

                            if (!empty($row['email'])) {

                                echo $row['email'];

                            }else{

                                echo "No email";

                            }

                            echo "	";

                            echo "";

                            echo date("d/m/Y @ H:i", $row['date']);

                            echo "	";

                            echo "";

                            if ($row['raw'] != 1) {

                                if ($row['raw'] == 2) {

                                    $comment = $mitsuba->caching->processComment($row['board'], $row['comment'], $parser, 2, 0);

                                } else {

                                    $comment = $mitsuba->caching->processComment($row['board'], $row['comment'], $parser, 2);

                                }

                            } else {

                                $comment = $row['comment'];

                            }

                            echo $comment;

                            echo "	";

                            echo "";

                            if (!empty($row['subject'])) {
                                echo $row['subject'];
                            }else{
                                echo "No Subject";
                            }

                            echo "	";
                            echo "";

                            echo '[D] [F] [B]';

                            echo "	";

                            echo "
";

                        }

                    ?>

<?php $mitsuba->admin->ui->endSection(); ?>


code:
<?php

if (!defined("IN_MOD")) {

    die("Nah, I won't serve that file to you.");

}

$mitsuba->admin->reqPermission("reports.clear.all");

    ?>

<?php $mitsuba->admin->ui->startSection($lang['mod/want_clear_reports']); ?>

<?php echo $lang['mod/no_big']; ?> <?php echo $lang['mod/yes_big']; ?><?php $mitsuba->admin->ui->endSection(); ?>


code:
<?php

if (!defined("IN_MOD")) {

    die("Nah, I won't serve that file to you.");

}

$mitsuba->admin->reqPermission("reports.clear.all");

        $conn->query("TRUNCATE TABLE reports;");

    ?>

        <meta http-equiv="refresh" content="0;URL='?/reports'" />


code:
<?php

if (!defined("IN_MOD")) {

    die("Nah, I won't serve that file to you.");

}

$mitsuba->admin->reqPermission("reports.view");

if ((!empty($_GET['cl'])) && ($_GET['cl']==1)) {

    $mitsuba->admin->reqPermission("reports.clear.single");

    if ((!empty($_GET['id'])) && (is_numeric($_GET['id']))) {

        $conn->query("DELETE FROM reports WHERE id=".$_GET['id']);

    }

}

if ((!empty($_GET['m'])) && (!empty($_GET['i'])) && (is_numeric($_GET['i']))) {

    $mitsuba->admin->reqPermission("reports.clear.multiple");

    switch($_GET['m'])

    {

    case "wtr":

        $rpinfo = $conn->query("SELECT * FROM reports WHERE id=".$_GET['i']);

        $rpinfo = $rpinfo->fetch_assoc();

        $conn->query("DELETE FROM reports WHERE reason='".$conn->real_escape_string($rpinfo['reason'])."'");

        break;

    case "ip":

        $rpinfo = $conn->query("SELECT * FROM reports WHERE id=".$_GET['i']);

        $rpinfo = $rpinfo->fetch_assoc();

        $conn->query("DELETE FROM reports WHERE ip='".$rpinfo['reporter_ip']."'");

        break;

    }

}

    ?>
<?php

if (($mitsuba->admin->checkPermission("reports.clear.all")) && ($mitsuba->admin->canBoard("%"))) {

?>
<?php

}

?>

<?php echo $lang['mod/reports']?>

                                            <?php echo $lang['mod/clear_all']; ?>

                      <?php echo $lang['mod/post']; ?>

                      <?php echo $lang['mod/file']; ?>

                      <?php echo $lang['mod/comment']; ?>

                      <?php echo $lang['mod/reason']; ?>

                      <?php echo $lang['mod/reporter_ip']; ?>

                      <?php echo $lang['mod/actions']; ?>

<?php

        require_once "libs/jbbcode/Parser.php";

        $parser = new \JBBCode\Parser();

        $bbcode = $conn->query("SELECT * FROM bbcodes;");

while ($row = $bbcode->fetch_assoc())

{

    $parser->addBBCode($row['name'], $row['code']);

}

        $result = $conn->query("SELECT * FROM reports ORDER BY created DESC");

while ($row = $result->fetch_assoc())

{

    $post = $conn->query("SELECT * FROM posts WHERE id=".$row['reported_post']." AND board='".$row['board']."'");

    if ($post->num_rows == 0) {

        $conn->query("DELETE FROM reports WHERE id=".$row['id']);

        continue;

    }

    $pdata = $post->fetch_assoc();

    $resto = $pdata['id'];

    if ($pdata['resto'] != 0) {

        $resto = $pdata['resto'];

    }

    echo "
";

    echo "/".$row['board']."/".$row['reported_post']."	";

    if (!empty($pdata['filename'])) {

        if ($pdata['filename'] == "deleted") {

            echo "	";

        } elseif (substr($pdata['filename'], 0, 8) == "spoiler:") {

            echo "	";

        } elseif (substr($pdata['filename'], 0, 6) == "embed:") {

            echo "Embed	";

        } else {

            echo "	";

        }

    } else {

        echo "	";

    }

    if ($pdata['raw'] == 0) {

        echo "".$mitsuba->caching->processComment($row['board'], $pdata['comment'], $parser, 2)."	";

    } elseif ($pdata['raw'] == 2) {

        echo "".$mitsuba->caching->processComment($row['board'], $pdata['comment'], $parser, 2, 0)."	";

    } else {

        echo "".$pdata['comment']."	";

    }

    echo "".$row['reason']."	";

    echo "".$row['reporter_ip']."	";

    echo "[ C ] [ B ";

    if ($mitsuba->admin->checkPermission("reports.clear.multiple")) {

        echo "/ & / D / F ]
";

        echo "[ I ]
";
        if($mitsuba->admin->canBoard("%")) {
            //Eradicate Doppelgangers and Eradicate Doppelgangers with IP address
            echo "[ ED / EDIP ]";
        }
        echo "	";

    } else {

        echo "]	";

    }

    echo "
";

}

    ?>

    <?php $mitsuba->admin->ui->endSection(); ?>


code:
<?php

if (!defined("IN_MOD")) {

    die("Nah, I won't serve that file to you.");

}

$mitsuba->admin->reqPermission("post.edit");

if ((!empty($_POST['b'])) && (!empty($_POST['p'])) && ($mitsuba->common->isBoard($_POST['b'])) && (is_numeric($_POST['p'])) && (!empty($_POST['text']))) {

    $mitsuba->admin->ui->checkToken($_POST['token']);

    $result = $conn->query("SELECT * FROM posts WHERE id=".$_POST['p']." AND board='".$_POST['b']."'");

    if ($result->num_rows == 1) {

        $row = $result->fetch_assoc();

        $raw = 0;

        if ((isset($_POST['raw'])) && ($_POST['raw'] == 1)) {

            $raw = 1;

        }

        $conn->query("UPDATE posts SET comment='".$mitsuba->common->preprocessComment($_POST['text'])."', raw=".$raw." WHERE id=".$_POST['p']." AND board='".$_POST['b']."'");

        $resto = $row['resto'];

        if ($row['resto'] == 0) {

            $mitsuba->caching->generateCatalog($_GET['b']);

            $mitsuba->caching->generateView($_POST['b'], $row['id']);

            if ($config['caching_mode']==1) {

                $mitsuba->caching->forceGetThread($_POST['b'], $row['id']);

            }

            if ($config['enable_api']==1) {

                $mitsuba->caching->serializeThread($_POST['b'], $row['id']);

            }

            $resto = $row['id'];

        } else {

            $mitsuba->caching->generateView($_POST['b'], $row['resto']);

            if ($config['caching_mode']==1) {

                $mitsuba->caching->forceGetThread($_POST['b'], $row['resto']);

            }

            if ($config['enable_api']==1) {

                $mitsuba->caching->serializeThread($_POST['b'], $row['resto']);

            }

        }

        if ($config['enable_api']==1) {

            $mitsuba->caching->serializeBoard($_GET['b']);

        }

        $mitsuba->caching->generateView($_POST['b']);

        ?>

    <?php $mitsuba->admin->ui->startSection($lang['mod/post_updated']); ?>

    <?php $mitsuba->admin->ui->endSection(); ?>

  <meta http-equiv="refresh" content="2;URL='?/board&b=<?php echo $_POST['b']; ?>&t=<?php echo $resto; ?>#p<?php echo $row['id']; ?>'" />

                <?php

    }

}

?>


code:
<?php

if (!defined("IN_MOD")) {

    die("Nah, I won't serve that file to you.");

}

$mitsuba->admin->reqPermission("search.ip");

if ((!empty($_GET['ip'])) && (filter_var($_GET['ip'], FILTER_VALIDATE_IP))) {

    $mitsuba->admin->ui->startSection(sprintf($lang['mod/showing_posts'], $_GET['ip']));

    ?>

            <a href="?/delete_posts&ip=<?php echo $_GET['ip']; ?>"><?php echo $lang['mod/delete_ip']; ?>

            <?php echo $lang['mod/post']; ?>

            <?php echo $lang['mod/name']; ?>

            <?php echo $lang['mod/e_mail']; ?>

            <?php echo $lang['mod/date']; ?>

            <?php echo $lang['mod/comment']; ?>

            <?php echo $lang['mod/subject']; ?>

            <?php echo $lang['mod/file']; ?>

            <?php echo $lang['mod/delete']; ?>

    <?php

    include_once "libs/jbbcode/Parser.php";

    $parser = new \JBBCode\Parser();

    $bbcode = $conn->query("SELECT * FROM bbcodes;");

    while ($row = $bbcode->fetch_assoc())

    {

        $parser->addBBCode($row['name'], $row['code']);

    }

    $posts = $conn->query("SELECT * FROM posts WHERE ip='".$_GET['ip']."'");

    while ($row = $posts->fetch_assoc())

    {

        echo "
";

        if($row['resto'] == 0) {

            echo("/".$row['board']."/".$row['id'].".html");

        } else {

            echo("/".$row['board']."/".$row['resto'].".html#p".$row['id']."</a");

        }

        echo "	"; //roote technology xD

        $trip = "";

        if (!empty($row['trip'])) {

            $trip = "!".$row['trip']."";

        }

        if (!empty($row['capcode_text'])) {

            echo ''.$row['name'].''.$trip.' ## '.$row['capcode_text'].'';

        } else {

            echo ''.$row['name'].''.$trip;

        }

        echo "	";

        echo "".$row['email']."	";

        echo "".date("d/m/Y @ H:i", $row['date'])."	";

        if ($row['raw'] != 1) {

            if ($row['raw'] == 2) {

                $comment = $mitsuba->caching->processComment($row['board'], $row['comment'], $parser, 2, 0);

            } else {

                $comment = $mitsuba->caching->processComment($row['board'], $row['comment'], $parser, 2);

            }

        } else {

            $comment = $row['comment'];

        }

        echo "".$comment."	";

        echo "".$row['subject']."	";

        if (!empty($row['filename'])) {

            if ($row['filename'] == "deleted") {

                echo "	";

            } elseif (substr($row['filename'], 0, 8) == "spoiler:") {

                echo "
Spoiler image	";

            } elseif (substr($row['filename'], 0, 6) == "embed:") {

                echo "Embed	";

            } else {

                echo "	";

            }

        } else {

            echo "	";

        }

        echo '[D] [F] [B]	';

    }

}

if ((empty($_GET['ip'])) && (!empty($_GET['id'])) && (is_numeric($_GET['id'])) && (!empty($_GET['board'])) ) {

    $mitsuba->admin->ui->startSection(sprintf("Search by post password Beta xD /%s/%d", $_GET['board'], $_GET['id']));

    ?>

            <?php echo $lang['mod/post']; ?>

            <?php echo $lang['mod/name']; ?>

            <?php echo $lang['mod/ip'];     ?>

            <?php echo $lang['mod/e_mail']; ?>

            <?php echo $lang['mod/date']; ?>

            <?php echo $lang['mod/comment']; ?>

            <?php echo $lang['mod/subject']; ?>

            <?php echo $lang['mod/file']; ?>

            <?php echo $lang['mod/delete']; ?>

    <?php

    include_once "libs/jbbcode/Parser.php";

    $parser = new \JBBCode\Parser();

    $bbcode = $conn->query("SELECT * FROM bbcodes;");

    while ($row = $bbcode->fetch_assoc())

    {

        $parser->addBBCode($row['name'], $row['code']);

    }

    $qID = $conn->real_escape_string($_GET['id']);

    $qBoard = $conn->real_escape_string($_GET['board']);

    $getPass = $conn->query("SELECT password FROM posts WHERE board='".$qBoard."' AND id='".$qID."' ");

    $rPass = $getPass->fetch_row();

    $posts = $conn->query("SELECT * FROM posts WHERE password='".$rPass[0]."'");

    while ($row = $posts->fetch_assoc())

    {

        echo "
";

        if($row['resto'] == 0) {

            echo("/".$row['board']."/".$row['id'].".html");

        } else {

            echo("/".$row['board']."/".$row['resto'].".html#p".$row['id']."");

        }

        echo "	";

        $trip = "";

        if (!empty($row['trip'])) {

            $trip = "!".$row['trip']."";

        }

        if (!empty($row['capcode_text'])) {

            echo ''.$row['name'].''.$trip.' ## '.$row['capcode_text'].'';

        } else {

            echo ''.$row['name'].''.$trip;

        }

        echo "	";

        echo "".$row['ip']."	";

        echo "".$row['email']."	";

        echo "".date("d/m/Y @ H:i", $row['date'])."	";

        if ($row['raw'] != 1) {

            if ($row['raw'] == 2) {

                $comment = $mitsuba->caching->processComment($row['board'], $row['comment'], $parser, 2, 0);

            } else {

                $comment = $mitsuba->caching->processComment($row['board'], $row['comment'], $parser, 2);

            }

        } else {

            $comment = $row['comment'];

        }

        echo "".$comment."	";

        echo "".$row['subject']."	";

        if (!empty($row['filename'])) {

            if ($row['filename'] == "deleted") {

                echo "	";

            } elseif (substr($row['filename'], 0, 8) == "spoiler:") {

                echo "
Spoiler image	";

            } elseif (substr($row['filename'], 0, 6) == "embed:") {

                echo "Embed	";

            } else {

                echo "	";

            }

        } else {

            echo "	";

        }

        echo '[D] [F] [B]	';

    }

}

    ?>

<?php $mitsuba->admin->ui->endSection(); ?>


code:
<?php

if (!defined("IN_MOD")) {

    die("Nah, I won't serve that file to you.");

}

$mitsuba->admin->reqPermission("spamfilter.update");

if (!empty($_GET['n'])) {

    $result = $conn->query("SELECT * FROM spamfilter WHERE id=".$conn->real_escape_string($_GET['n']));

    if ($result->num_rows == 1) {

        $info = $result->fetch_assoc();

    ?>

    <?php $mitsuba->admin->ui->startSection($lang['mod/sf_edit']); ?>

  <form action="?/spamfilter" method="POST">

    <?php $mitsuba->admin->ui->getToken($path); ?>

  <input type="hidden" name="mode" value="edit">

  <input type="hidden" name="id" value="<?php echo $_GET['n']; ?>">

    <?php echo $lang['mod/wf_search']; ?>: <input type="text" name="search" value="<?php echo htmlspecialchars($info['search']); ?>"/>

    <?php echo $lang['mod/reason']; ?>: <input type="text" name="reason" value="<?php echo htmlspecialchars($info['reason']); ?>"/>

    <?php echo $lang['mod/expires']; ?>: <input type="text" name="expires" value="<?php echo htmlspecialchars($info['expires']); ?>"/>

    <?php $mitsuba->admin->ui->getBoardList($info['boards']); ?>

  <input type="submit" value="<?php echo $lang['mod/submit']; ?>" />

  </form>

    <?php $mitsuba->admin->ui->endSection(); ?>

    <?php

    }

}

?>


code:
<?php

if (!defined("IN_MOD")) {

    die("Nah, I won't serve that file to you.");

}

$mitsuba->admin->reqPermission("spamfilter.view");

        $search = "";

        $reason = "";

        $expires = "";

        $regex = 0;

if ((!empty($_POST['mode'])) && ($_POST['mode'] == "add")) {

    $mitsuba->admin->reqPermission("spamfilter.add");

    $mitsuba->admin->ui->checkToken($_POST['token']);

    $continue = 0;

    if (empty($_POST['search'])) { echo "".$lang['mod/fill_all_fields']."";
    } else { $search = $_POST['search']; $continue = 1;
    }

    if (empty($_POST['reason'])) { echo "".$lang['mod/fill_all_fields']."";
    } else { $reason = $_POST['reason']; $continue = 1;
    }

    if ($continue == 1) {

        $search = $conn->real_escape_string($_POST['search']);

        $reason = $conn->real_escape_string($_POST['reason']);

        $boards = "";

        $regex = isset($_POST['regex']);

        if ((!empty($_POST['all'])) && ($_POST['all']==1)) {

            $boards = "%";

        } else {

            if (!empty($_POST['boards'])) {

                foreach ($_POST['boards'] as $board)

                {

                    $boards .= $board.",";

                }

            } else {

                $board = "%";

            }

        }

        if ($boards != "%") { $boards = substr($boards, 0, strlen($boards) - 1);
        }

        $expires = $_POST['expires'];

        $perma = 1;

        if (($expires == "0") || ($expires == "never") || ($expires == "") || ($expires == "perm") || ($expires == "permaban")) {

            $expires = "never";

        } else {

            $expirex = $mitsuba->common->parse_time($expires);

            if (($expirex == false) && ($perma == 0)) {

                echo "".$lang['mod/fool']."";

            }

        }

        $conn->query("INSERT INTO spamfilter (`search`, `reason`, `boards`, `expires`, `active`, `regex`) VALUES ('".$search."', '".$reason."', '".$boards."', '".$expires."', 1, '".$regex."');");

    }

    $search = "";

    $reason = "";

    $expires = "";

    $regex = 0;

} elseif ((!empty($_POST['mode'])) && ($_POST['mode'] == "edit") && (!empty($_POST['id']))) {

    $mitsuba->admin->reqPermission("spamfilter.update");

    $mitsuba->admin->ui->checkToken($_POST['token']);

    $continue = 0;

    if (empty($_POST['search'])) { echo "".$lang['mod/fill_all_fields']."";
    } else { $search = $_POST['search']; $continue = 1;
    }

    if (empty($_POST['reason'])) { echo "".$lang['mod/fill_all_fields']."";
    } else { $reason = $_POST['reason']; $continue = 1;
    }

    if ($continue == 1) {

        $search = $conn->real_escape_string($_POST['search']);

        $id = $_POST['id'];

        if (!is_numeric($id)) { echo "".$lang['mod/fool']."";
        }

        $reason = $conn->real_escape_string($_POST['reason']);

        $regex = isset($_POST['regex']);

        $boards = "";

        if ((!empty($_POST['all'])) && ($_POST['all']==1)) {

            $boards = "%";

        } else {

            if (!empty($_POST['boards'])) {

                foreach ($_POST['boards'] as $board)

                {

                    $boards .= $board.",";

                }

            } else {

                $board = "%";

            }

        }

        if ($boards != "%") { $boards = substr($boards, 0, strlen($boards) - 1);
        }

        $expires = $_POST['expires'];

        $perma = 1;

        if (($expires == "0") || ($expires == "never") || ($expires == "") || ($expires == "perm") || ($expires == "permaban")) {

            $expires = "never";

        } else {

            $expirex = $mitsuba->common->parse_time($expires);

            if (($expirex == false) && ($perma == 0)) {

                echo "".$lang['mod/fool']."";

            }

        }

        $conn->query("UPDATE spamfilter SET `search`='".$search."', `reason`='".$reason."', `boards`='".$boards."', `expires`='".$expires."', `active`= 1, `regex`='".$regex."' WHERE id=".$id);

    }

    $search = "";

    $reason = "";

    $expires = "";

    $regex = "";

}

if ((!empty($_GET['d'])) && ($_GET['d'] == 1) && (!empty($_GET['n']))) {

    $mitsuba->admin->reqPermission("spamfilter.delete");

    $n = $conn->real_escape_string($_GET['n']);

    if (!is_numeric($n)) { echo "".$lang['mod/fool']."";
    }

    $conn->query("DELETE FROM spamfilter WHERE id=".$n);

}

    ?>

<?php echo $lang['mod/rebuild_notice']; ?>

<?php $mitsuba->admin->ui->startSection($lang['mod/manage_spamfilter']); ?>

<?php echo $lang['mod/wf_search']; ?>

<?php echo $lang['mod/regex']; ?>

<?php echo $lang['mod/reason']; ?>

<?php echo $lang['mod/boards']; ?>

<?php echo $lang['mod/expires']; ?>

<?php echo $lang['mod/actions']; ?>

<?php

    $_data = $conn->query("SELECT short FROM boards");

    $_boards = array();

while ($row = $_data->fetch_assoc()) { $_boards[] = $row['short'];
}

$result = $conn->query("SELECT * FROM spamfilter ORDER BY search ASC");

while ($row = $result->fetch_assoc())

{

    echo "
";

    echo "".htmlspecialchars($row['search'])."	";

    echo ""; if ($row['regex'] == 1) { echo($lang['mod/yes']);
    } else {echo($lang['mod/no']);
    } echo "	";

    echo "".htmlspecialchars($row['reason'])."	";

    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['expires']."	";

    echo "".$lang['mod/delete']." ".$lang['mod/edit']."	";

    echo "
";

}

?>

<?php $mitsuba->admin->ui->endSection(); ?>

<?php $mitsuba->admin->ui->startSection($lang['mod/sf_add']); ?>

<form action="?/spamfilter" method="POST">

<?php $mitsuba->admin->ui->getToken($path); ?>

<input type="hidden" name="mode" value="add">

<?php echo $lang['mod/wf_search']; ?>: <input type="text" name="search" value="<?php echo htmlspecialchars($search); ?>"/>

<?php echo $lang['mod/reason']; ?>: <input type="text" name="reason" value="<?php echo htmlspecialchars($reason); ?>"/>

<?php echo $lang['mod/expires']; ?>: <input type="text" name="expires" value="<?php echo htmlspecialchars($expires); ?>"/>

<?php echo $lang['mod/regex'] ?>: <input type="checkbox" name="regex" <?php if($regex == 1) { echo "checked";
}?>"/>

<?php

$mitsuba->admin->ui->getBoardList();

?>

<input type="submit" value="<?php echo $lang['mod/submit']; ?>" />

</form>

<?php $mitsuba->admin->ui->endSection(); ?>


code:
<?php

if (!defined("IN_MOD")) {

    die("Nah, I won't serve that file to you.");

}

$mitsuba->admin->reqPermission("config.rebuild");

$mitsuba->admin->ui->checkToken($_POST['token']);

if ((!empty($_POST['frontpage'])) && ($_POST['frontpage']==1)) {

    $mitsuba->caching->generateFrontpage();

}

if ((!empty($_POST['news'])) && ($_POST['news']==1)) {

    $mitsuba->caching->generateNews();

}

        $result = $conn->query("SELECT * FROM pages;");

while ($row = $result->fetch_assoc())

{

    if ((!empty($_POST[$row['name']])) && ($_POST[$row['name']] == 1)) {

        $mitsuba->caching->generatePage($row['name']);

    }

}

    ?>

<?php $mitsuba->admin->ui->startSection($lang['mod/rebuilding_done']); ?>

<?php echo $lang['mod/back']; ?>

<?php $mitsuba->admin->ui->endSection(); ?>


code:
<?php

if (!defined("IN_MOD")) {

    die("Nah, I won't serve that file to you.");

}

$mitsuba->admin->reqPermission("post.sticky");

?>

<?php $mitsuba->admin->ui->startSection($lang['mod/sticky']); ?>

<?php echo $lang['mod/id']; ?>

<?php echo $lang['mod/comment']; ?>

<?php echo $lang['mod/unstick']; ?>

    <?php

    require_once "libs/jbbcode/Parser.php";

    $parser = new \JBBCode\Parser();

    $bbcode = $conn->query("SELECT * FROM bbcodes;");

    while ($row = $bbcode->fetch_assoc())

    {

        $parser->addBBCode($row['name'], $row['code']);

    }

    $threads = $conn->query("SELECT * FROM posts WHERE sticky=1 AND resto=0 ORDER BY lastbumped DESC;");

    while ($thread = $threads->fetch_assoc())

    {

        echo "
";

        echo "/".$thread['board']."/".$thread['id']."	";

        if ($thread['raw'] == 0) {

            echo "".$mitsuba->caching->processComment($thread['board'], $thread['comment'], $parser, 2)."	";

        } elseif ($thread['raw'] == 2) {

            echo "".$mitsuba->caching->processComment($thread['board'], $thread['comment'], $parser, 2, 0)."	";

        } else {

            echo "".$thread['comment']."	";

        }

        echo "".$lang['mod/unstick']."	";

        echo "
";

    }

    ?>

<?php $mitsuba->admin->ui->endSection(); ?>


code:
<?php

if (!defined("IN_MOD")) {

    die("Nah, I won't serve that file to you.");

}

$mitsuba->admin->reqPermission("post.sticky");

if ((!empty($_GET['b'])) && (!empty($_GET['t'])) && ($bdata = $mitsuba->common->isBoard($_GET['b'])) && (is_numeric($_GET['t']))) {

    $mitsuba->admin->canBoard($_GET['b']);

    $result = $conn->query("SELECT * FROM posts WHERE id=".$_GET['t']." AND resto=0 AND board='".$_GET['b']."'");

    if ($result->num_rows == 1) {

        $pdata = $result->fetch_assoc();

        if ($pdata['sticky'] == 1) {

            $conn->query("UPDATE posts SET sticky=0 WHERE id=".$_GET['t']." AND board='".$_GET['b']."'");

            $mitsuba->caching->generatePost($_GET['b'], $_GET['t']);

        ?>

    <?php $mitsuba->admin->ui->startSection($lang['mod/unstickied']); ?>

    <meta http-equiv="refresh" content="1;URL='./<?php echo $_GET['b']."/res/".$_GET['t']; ?>.html'" />

    <?php $mitsuba->admin->ui->endSection(); ?>

        <?php

        } else {

            $conn->query("UPDATE posts SET sticky=1 WHERE id=".$_GET['t']." AND board='".$_GET['b']."'");

            $mitsuba->caching->generatePost($_GET['b'], $_GET['t']);

                ?>

            <?php $mitsuba->admin->ui->startSection($lang['mod/stickied']); ?>

            <meta http-equiv="refresh" content="1;URL='./<?php echo $_GET['b']."/res/".$_GET['t']; ?>.html'" />

            <?php $mitsuba->admin->ui->endSection(); ?>

        <?php

        }

    } else {

    ?>

    <?php $mitsuba->admin->ui->startSection($lang['mod/thread_not_found']); ?>

    <?php $mitsuba->admin->ui->endSection(); ?>

    <?php

    }

} else {

}

?>


code:
<?php

if (!defined("IN_MOD")) {

    die("Nah, I won't serve that file to you.");

}

$mitsuba->admin->reqPermission("styles.view");

        $search = "";

        $replace = "";

if ((!empty($_POST['mode'])) && ($_POST['mode'] == "upload")) {

    $mitsuba->admin->reqPermission("styles.upload");

    $mitsuba->admin->ui->checkToken($_POST['token']);

    $shouldnt = 0;

    if (empty($_POST['name'])) { echo "".$lang['mod/fill_all_fields'].""; $shouldnt = 1;
    }

    if (empty($_FILES['upfile']['tmp_name'])) { echo "".$lang['mod/no_file'].""; $shouldnt = 1;
    }

    if (!$shouldnt) {

        $name = $conn->real_escape_string($_POST['name']);

        $filename = strtolower(preg_replace('/[^a-zA-Z0-9_ %\[\]\.\(\)%&-]/s', '', $_FILES['upfile']['name']));

        if(move_uploaded_file($_FILES['upfile']['tmp_name'], "./css/".$filename)) {

            $conn->query("INSERT INTO styles (`name`, `path`, `relative`, `default`) VALUES ('".$name."', './css/".$filename."', 1, 0);");

            echo "".$lang['mod/style_uploaded']."";

        }

    }

}

if ((!empty($_GET['def'])) && ($_GET['def'] == 1) && (!empty($_GET['n']))) {

    $mitsuba->admin->reqPermission("styles.update");

    $n = $conn->real_escape_string($_GET['n']);

    if (!is_numeric($n)) { echo "".$lang['mod/fool']."";
    }

    $conn->query("UPDATE styles SET `default`=0");

    $conn->query("UPDATE styles SET `default`=1 WHERE id=".$n);

}

if ((!empty($_GET['d'])) && ($_GET['d'] == 1) && (!empty($_GET['n']))) {

    $mitsuba->admin->reqPermission("styles.delete");

    $n = $conn->real_escape_string($_GET['n']);

    if (!is_numeric($n)) { echo "".$lang['mod/fool']."";
    }

    $conn->query("DELETE FROM styles WHERE id=".$n);

}

if ((!empty($_GET['f'])) && ($_GET['f'] == 1) && (!empty($_GET['n']))) {

    $mitsuba->admin->reqPermission("styles.delete");

    $n = $conn->real_escape_string($_GET['n']);

    if (!is_numeric($n)) { echo "".$lang['mod/fool']."";
    }

    $result = $conn->query("SELECT * FROM styles WHERE id=".$n);

    $row = $result->fetch_assoc();

    unlink($row['path']);

    $conn->query("DELETE FROM styles WHERE id=".$n);

}

    ?>

<?php echo $lang['mod/rebuild_notice']; ?>

<?php $mitsuba->admin->ui->startSection($lang['mod/manage_styles']); ?>

<?php echo $lang['mod/name']; ?>

<?php echo $lang['mod/file']; ?>

<?php echo $lang['mod/actions']; ?>

<?php

$result = $conn->query("SELECT * FROM styles ORDER BY name ASC");

while ($row = $result->fetch_assoc())

{

    echo "
";

    echo "".htmlspecialchars($row['name']);

    if ($row['default'] == 1) { echo " ( ".$lang['mod/default']." )";
    }

    echo "	";

    echo "".$lang['mod/show_file']."	";

    echo "".$lang['mod/delete']."(".$lang['mod/delete_no_file'].")";

    if ($row['default'] == 0) {

        echo " ".$lang['mod/make_default']."";

    }

    echo "	";

    echo "
";

}

?>

<?php $mitsuba->admin->ui->endSection(); ?>

<?php $mitsuba->admin->ui->startSection($lang['mod/upload_style']); ?>

<form action="?/styles" method="POST" enctype="multipart/form-data">

<?php $mitsuba->admin->ui->getToken($path); ?>

<input type="hidden" name="MAX_FILE_SIZE" value="2097152">

<input type="hidden" name="mode" value="upload">

<?php echo $lang['mod/file']; ?>: <input id="postFile" name="upfile" type="file">

<?php echo $lang['mod/name']; ?>: <input type="text" name="name"/>

<input type="submit" value="<?php echo $lang['mod/submit']; ?>" />

</form>

<?php $mitsuba->admin->ui->endSection(); ?>


code:
<?php

if (!defined("IN_MOD")) {

    die("Nah, I won't serve that file to you.");

}

$mitsuba->admin->reqPermission("users.add");

$mitsuba->admin->ui->checkToken($_POST['token']);

if ((!empty($_POST['username'])) && (!empty($_POST['password'])) && (is_numeric($_POST['type']))) {

    $type = $_POST['type'];

    if (empty($type)) { $type = 0;
    }

    $boards = "";

    if ((!empty($_POST['all'])) && ($_POST['all']==1)) {

        $boards = "%";

    } else {

        if (!empty($_POST['boards'])) {

            foreach ($_POST['boards'] as $board)

            {

                $boards .= $board.",";

            }

        } else {

            $board = "%";

        }

    }

    if ($boards != "%") { $boards = substr($boards, 0, strlen($boards) - 1);
    }

    $result = $mitsuba->admin->users->addUser($_POST['username'], $_POST['password'], $type, $boards);

    if ($result == 1) {

        $mitsuba->admin->logAction(sprintf($lang['log/user_added'], $conn->real_escape_string($_POST['username'])));

    ?>

    <?php $mitsuba->admin->ui->startSection($lang['mod/user_added']); ?>

 <?php echo $lang['mod/back']; ?><?php $mitsuba->admin->ui->endSection(); ?>

                <?php

    } else {

    ?>

    <?php $mitsuba->admin->ui->startSection($lang['mod/user_exists']); ?>

 <?php echo $lang['mod/back']; ?><?php $mitsuba->admin->ui->endSection(); ?>

                <?php

    }

} else {

    ?>

<?php $mitsuba->admin->ui->startSection($lang['mod/fill_all_fields']); ?>

<?php echo $lang['mod/back']; ?><?php $mitsuba->admin->ui->endSection(); ?>

                <?php

}

?>


code:
<?php

if (!defined("IN_MOD")) {

    die("Nah, I won't serve that file to you.");

}

$mitsuba->admin->reqPermission("users.delete");

if (!empty($_GET['id'])) {

    ?>

<?php $mitsuba->admin->ui->startSection($lang['mod/user_want_delete']); ?>

<?php echo $lang['mod/no_big']; ?> <a href="?/users/delete_yes&id=<?php echo $_GET['id']; ?>"><?php echo $lang['mod/yes_big']; ?><?php $mitsuba->admin->ui->endSection(); ?>

                <?php

} else {

    ?>

<?php $mitsuba->admin->ui->startSection($lang['mod/user_not_exists']); ?>

<?php echo $lang['mod/back']; ?><?php $mitsuba->admin->ui->endSection(); ?>

                <?php

}

?>


code:
<?php

if (!defined("IN_MOD")) {

    die("Nah, I won't serve that file to you.");

}

$mitsuba->admin->reqPermission("users.delete");

if ((!empty($_GET['id'])) && (is_numeric($_GET['id']))) {

    $id = $_GET['id'];

    if ($username = $mitsuba->admin->users->isUser($id)) {

        $mitsuba->admin->users->delUser($id);

        $mitsuba->admin->logAction(sprintf($lang['log/user_deleted'], $username));

        ?>

    <?php $mitsuba->admin->ui->startSection($lang['mod/user_deleted']); ?>

 <?php echo $lang['mod/back']; ?><?php $mitsuba->admin->ui->endSection(); ?>

        <?php

    } else {

        ?>

    <?php $mitsuba->admin->ui->startSection($lang['mod/user_not_exists']); ?>

 <?php echo $lang['mod/back']; ?><?php $mitsuba->admin->ui->endSection(); ?>

        <?php

    }

}

?>


code:
<?php

if (!defined("IN_MOD")) {

    die("Nah, I won't serve that file to you.");

}

$mitsuba->admin->reqPermission("users.update");

if ((!empty($_GET['id'])) && (is_numeric($_GET['id']))) {

    $id = $_GET['id'];

    if ($username = $mitsuba->admin->users->isUser($id)) {

        if ((!empty($_POST['username'])) && (is_numeric($_POST['type']))) {

            $mitsuba->admin->ui->checkToken($_POST['token']);

            $type = $_POST['type'];

            if (empty($type)) { $type = 0;
            }

            $boards = "";

            if ((!empty($_POST['all'])) && ($_POST['all']==1)) {

                $boards = "%";

            } else {

                if (!empty($_POST['boards'])) {

                    foreach ($_POST['boards'] as $board)

                    {

                        $boards .= $board.",";

                    }

                } else {

                    $board = "%";

                }

            }

            if ($username != $_POST['username']) {

                $mitsuba->admin->logAction(sprintf($lang['log/changed_username'], $username, $_POST['username']));

            }

            $mitsuba->admin->logAction(sprintf($lang['log/edited_user'], $username));

            if ($boards != "%") { $boards = substr($boards, 0, strlen($boards) - 1);
            }

            $mitsuba->admin->users->updateUser($id, $_POST['username'], $_POST['password'], $_POST['type'], $boards);

            ?>

    <?php $mitsuba->admin->ui->startSection($lang['mod/user_updated']); ?>

    <?php echo $lang['mod/back']; ?>

    <?php $mitsuba->admin->ui->endSection(); ?>

            <?php

        } else {

            $result = $conn->query("SELECT * FROM users WHERE id=".$_GET['id']);

            $data = $result->fetch_assoc();

            $boards = $data['boards'];

            if ($data['boards'] != "%") { $board = explode(",", $data['boards']);
            }

        ?>

    <?php $mitsuba->admin->ui->startSection($lang['mod/edit_user']); ?>

    <form action="?/users/edit&id=<?php echo $id; ?>" method="POST">

    <?php $mitsuba->admin->ui->getToken($path); ?>

    <?php echo $lang['mod/username']; ?>: <input type="text" name="username" value="<?php echo $data['username']; ?>"/>

    <?php echo $lang['mod/password_leave_blank']; ?>: <input type="password" name="password"/>

    <?php echo $lang['mod/type']; ?>: <select name="type">

    <?php

    $groups = $conn->query("SELECT * FROM groups");

    while ($row = $groups->fetch_assoc())

    {

        if ($data['group']==$row['id']) {

            echo "<option value=".$row['id']." selected>".$row['name']."</option>";

        } else {

            echo "<option value=".$row['id'].">".$row['name']."</option>";

        }

    }

    ?>

    </select>

    <?php

    $mitsuba->admin->ui->getBoardList($boards);

    ?>

    <input type="submit" value="<?php echo $lang['mod/submit']; ?>" />

   </form>

    <?php $mitsuba->admin->ui->endSection(); ?>

    <?php

        }

    }

}

?>


code:
<?php

if (!defined("IN_MOD")) {

    die("Nah, I won't serve that file to you.");

}

$mitsuba->admin->reqPermission("users.view");

    ?>

<?php echo $lang['mod/new_user'] ?>

                    <form action="?/users/add" method="POST">
        <?php $mitsuba->admin->ui->getToken($path); ?>
        <?php echo $lang['mod/username']; ?>: <input type="text" name="username" />

        <?php echo $lang['mod/password']; ?>: <input type="password" name="password"/>

        <?php echo $lang['mod/type']; ?>:
                    <select name="type">
        <?php
        $groups = $conn->query("SELECT * FROM groups");
        while ($row = $groups->fetch_assoc()){
            echo "<option value=".$row['id'].">".$row['name']."</option>";
        }
        ?>
                    </select>

        <?php
        $mitsuba->admin->ui->getBoardList();
        ?>

                    <input type="submit" value="<?php echo $lang['mod/add_user']; ?>" />
                    </form>

<?php echo $lang['mod/all_users'] ?>

                      <?php echo $lang['mod/username']; ?>
                      <?php echo $lang['mod/type']; ?>
                      <?php echo $lang['mod/boards']; ?>
                      <?php echo $lang['mod/edit']; ?>
                      <?php echo $lang['mod/delete']; ?>

                    <?php
                        $result = $conn->query("SELECT users.*, groups.name AS gname FROM users LEFT JOIN groups ON users.group=groups.id ORDER BY FIELD(gname, 'Administrator', 'Moderator', 'Janitor', 'Disabled'), users.username;");
                        $usern = $result->num_rows;
                    while ($row = $result->fetch_assoc()){
                        echo "
";
                        echo "".$row['username']."	";
                        echo "";
                        echo $row['gname'];
                        echo "	";
                        if ($row['boards']=="%") {
                            echo "All boards	";
                        }else{
                            echo "".$row['boards']."	";
                        }
                        echo "".$lang['mod/edit']."	";
                        if ($usern != 1) {
                            echo "".$lang['mod/delete']."	";
                        } else {
                            echo "	";
                        }
                        echo "
";
                    }
?>

<?php $mitsuba->admin->ui->endSection(); ?>


code:
<?php

if (!defined("IN_MOD")) {

    die("Nah, I won't serve that file to you.");

}

$mitsuba->admin->reqPermission("warnings.add");

if (empty($_POST['ip'])) {

    $IPAddress = "";

    $post = "";

    $board = "";

    $postinfo = "";

    if ((!empty($_GET['p'])) && (!empty($_GET['b'])) && (is_numeric($_GET['p'])) && ($mitsuba->common->isBoard($_GET['b']))) {

        $board = $conn->real_escape_string($_GET['b']);

        $post = $_GET['p'];

        //(USER WAS BANNED FOR THIS POST)

        $postdata = $conn->query("SELECT * FROM posts WHERE id=".$post." AND board='".$board."'");

        if ($postdata->num_rows == 1) {

            $postinfo = $postdata->fetch_assoc();

            $IPAddress = $postinfo['ip'];

        } else {

            $post = "";

            $board = "";

        }

    }

    ?>

<?php $mitsuba->admin->ui->startSection($lang['mod/add_warning']); ?>

<form action="?/warnings/add" method="POST">

<?php $mitsuba->admin->ui->getToken($path); ?>

<?php echo $lang['mod/ip']; ?>: <input type="text" name="ip" value="<?php echo $IPAddress; ?>"/>

<?php echo $lang['mod/reason']; ?>: <input type="text" name="reason" />

<?php echo $lang['mod/staff_note']; ?>: <input type="text" name="note" />

<?php

if (!empty($postinfo)) {

?>

<input type="hidden" name="post" value="<?php echo $post; ?>" />

<input type="hidden" name="board" value="<?php echo $board; ?>" />

<?php

if ((!empty($_GET['d'])) && ($_GET['d'] == 1)) {

?>

<input type="hidden" name="delete" value="1" /><?php echo $lang['mod/will_delete']; ?>

<?php

} else {

?>

<?php echo $lang['mod/append_text']; ?>: <input type="text" name="append_text" value='(USER WAS WARNED FOR THIS POST)' style="width: 400px;"/><input type="checkbox" name="append" value="1" checked=1/><?php echo $lang['mod/yes']; ?>

<?php

}

}

?>

<input type="submit" value="<?php echo $lang['mod/submit']; ?>" />

</form>

<?php $mitsuba->admin->ui->endSection(); ?>

    <?php

} else {

    $mitsuba->admin->ui->checkToken($_POST['token']);

    if (!filter_var($_POST['ip'], FILTER_VALIDATE_IP)) {

    ?>

    <?php $mitsuba->admin->ui->startSection($lang['mod/ip_syntax_wrong']); ?>

  <?php echo $lang['mod/back']; ?>

    <?php $mitsuba->admin->ui->endSection(); ?>

    <?php

    exit;

    }

    $post = "";

    $board = "";

    $postinfo = "";

    if ((!empty($_POST['post'])) && (!empty($_POST['board'])) && (is_numeric($_POST['post'])) && ($mitsuba->common->isBoard($_POST['board']))) {

        $board = $conn->real_escape_string($_POST['board']);

        $post = $_POST['post'];

        //(USER WAS BANNED FOR THIS POST)

        $postdata = $conn->query("SELECT * FROM posts WHERE id=".$post." AND board='".$board."'");

        if ($postdata->num_rows == 0) {

            $post = "";

            $board = "";

        }

    }

    $result = 0;

    $result = $mitsuba->admin->bans->addWarning($_POST['ip'], $_POST['reason'], $_POST['note']);

    if ($result != -2) {

        if ((!empty($_POST['delete'])) && ($_POST['delete']=="1")) {

            $mitsuba->posting->deletePost($board, $post, "", 0, $mitsuba->admin->checkPermission("post.delete"));

        } else {

            if ((!empty($post)) && (!empty($_POST['append'])) && ($_POST['append'] == 1)) {

                $mitsuba->admin->appendToPost($board, $post, $_POST['append_text']);

            }

        }

    }

    if ($result == 1) {

    ?>

    <?php $mitsuba->admin->ui->startSection($lang['mod/user_warned']); ?>

  <?php echo $lang['mod/back']; ?>

    <?php $mitsuba->admin->ui->endSection(); ?>

                <?php

    } else {

    ?>

    <?php $mitsuba->admin->ui->startSection($lang['mod/filled_wrong']); ?>

  <?php echo $lang['mod/back']; ?>

    <?php $mitsuba->admin->ui->endSection(); ?>

                <?php

    }

}

?>


code:
<?php

if (!defined("IN_MOD")) {

    die("Nah, I won't serve that file to you.");

}

$mitsuba->admin->reqPermission("warnings.view");

if ((isset($_GET['del'])) && ($_GET['del']==1)) {

    $mitsuba->admin->reqPermission("warnings.delete");

    if ((!empty($_GET['b'])) && (is_numeric($_GET['b']))) {

        $conn->query("DELETE FROM warnings WHERE id=".$_GET['b']);

    }

}

    ?>

<?php $mitsuba->admin->ui->startSection(''); ?>

<?php echo $lang['mod/all_warnings'];?>

                  <?php printf($lang['mod/showing_warnings'], 15); ?>
                  | <?php echo $lang['mod/show_all']; ?>
                  | <?php printf($lang['mod/show_recent'], 100); ?>

                  <?php echo $lang['mod/ip']; ?>
                  <?php echo $lang['mod/reason']; ?>
                  <?php echo $lang['mod/staff_note']; ?>
                  <?php echo $lang['mod/created']; ?>
                  <?php echo $lang['mod/shown']; ?>
                  <?php echo $lang['mod/delete']; ?>

                <?php
                $result = $conn->query("SELECT * FROM warnings ORDER BY created;");
                while ($row = $result->fetch_assoc()){
                    echo "
";
                    echo "".$row['ip']."	";
                    echo "".$row['reason']."	";
                    echo "".$row['note']."	";
                    echo "".date("d/m/Y @ H:i", $row['created'])."	";
                    if ($row['seen']==1) {
                        echo "YES	";
                    } else {
                        echo "NO	";
                    }
                    if ($_SESSION['type']>=2) {
                        echo "".$lang['mod/delete']."	";
                    } else {
                        echo "	";
                    }
                    echo "
";
                }
?>

<?php $mitsuba->admin->ui->endSection(); ?>


code:
<?php

if (!defined("IN_MOD")) {

    die("Nah, I won't serve that file to you.");

}

$mitsuba->admin->reqPermission("warnings.view");

if ((isset($_GET['del'])) && ($_GET['del']==1)) {

    $mitsuba->admin->reqPermission("warnings.delete");

    if ((!empty($_GET['b'])) && (is_numeric($_GET['b']))) {

        $conn->query("DELETE FROM warnings WHERE id=".$_GET['b']);

    }

}

    ?>

<?php $mitsuba->admin->ui->startSection(''); ?>

<?php echo $lang['mod/warnings'];?>

                <?php printf($lang['mod/showing_warnings'], 15); ?>
                  | <?php echo $lang['mod/show_all']; ?>
                  | <?php printf($lang['mod/show_recent'], 100); ?>

                  <?php echo $lang['mod/ip']; ?>
                  <?php echo $lang['mod/reason']; ?>
                  <?php echo $lang['mod/staff_note']; ?>
                  <?php echo $lang['mod/created']; ?>
                  <?php echo $lang['mod/shown']; ?>
                  <?php echo $lang['mod/delete']; ?>

                <?php
                $result = $conn->query("SELECT * FROM warnings ORDER BY created LIMIT 0, 15;");
                while ($row = $result->fetch_assoc()){
                    echo "
";
                    echo "".$row['ip']."	";
                    echo "".$row['reason']."	";
                    echo "".$row['note']."	";
                    echo "".date("d/m/Y @ H:i", $row['created'])."	";
                    if ($row['seen']==1) {
                        echo "YES	";
                    } else {
                        echo "NO	";
                    }
                    if ($_SESSION['type']>=2) {
                        echo "".$lang['mod/delete']."	";
                    } else {
                        echo "	";
                    }
                    echo "
";
                }
?>

<?php $mitsuba->admin->ui->endSection(); ?>


code:
<?php

if (!defined("IN_MOD")) {

    die("Nah, I won't serve that file to you.");

}

$mitsuba->admin->reqPermission("warnings.view");

if ((isset($_GET['del'])) && ($_GET['del']==1)) {

    $mitsuba->admin->reqPermission("warnings.delete");

    if ((!empty($_GET['b'])) && (is_numeric($_GET['b']))) {

        $conn->query("DELETE FROM warnings WHERE id=".$_GET['b']);

    }

}

    $mitsuba->admin->ui->startSection('');

    ?>

<?php echo sprintf($lang['mod/recent_warnings'], $_GET['c'])?>

                  <?php printf($lang['mod/showing_warnings'], 15); ?>
                  | <?php echo $lang['mod/show_all']; ?>
                  | <?php printf($lang['mod/show_recent'], 100); ?>

                  <?php echo $lang['mod/ip']; ?>
                  <?php echo $lang['mod/reason']; ?>
                  <?php echo $lang['mod/staff_note']; ?>
                  <?php echo $lang['mod/created']; ?>
                  <?php echo $lang['mod/shown']; ?>
                  <?php echo $lang['mod/delete']; ?>

                <?php
                $result = $conn->query("SELECT * FROM warnings ORDER BY created LIMIT 0, ".$_GET['c'].";");
                while ($row = $result->fetch_assoc()){
                    echo "
";
                    echo "".$row['ip']."	";
                    echo "".$row['reason']."	";
                    echo "".$row['note']."	";
                    echo "".date("d/m/Y @ H:i", $row['created'])."	";
                    if ($row['seen']==1) {
                        echo "YES	";
                    } else {
                        echo "NO	";
                    }
                    if ($_SESSION['type']>=2) {
                        echo "".$lang['mod/delete']."	";
                    } else {
                        echo "	";
                    }
                    echo "
";
                }
?>

<?php $mitsuba->admin->ui->endSection(); ?>


code:
<?php

if (!defined("IN_MOD")) {

    die("Nah, I won't serve that file to you.");

}

$mitsuba->admin->reqPermission("whitelist.view");

if ((isset($_GET['del'])) && ($_GET['del']==1)) {

    $mitsuba->admin->reqPermission("whitelist.delete");

    if ((!empty($_GET['b'])) && (is_numeric($_GET['b']))) {

        $conn->query("DELETE FROM whitelist WHERE id=".$_GET['b']);

    }

}

if ((!empty($_GET['m'])) && ($_GET['m']=="add")) {

    $mitsuba->admin->reqPermission("whitelist.add");

    $mitsuba->admin->ui->checkToken($_POST['token']);

    if (!filter_var($_POST['ip'], FILTER_VALIDATE_IP)) {

    ?>

    <?php $mitsuba->admin->ui->startSection($lang['mod/ip_syntax_wrong']); ?>

  <?php echo $lang['mod/back']; ?>

    <?php $mitsuba->admin->ui->endSection(); ?>

    <?php

    exit;

    }

    $nolimits = 0;

    if ((!empty($_POST['nolimits'])) && ($_POST['nolimits']==1)) {

        $nolimits = 1;

    }

    $conn->query("INSERT INTO whitelist (ip, mod_id, note, nolimits) VALUES ('".$_POST['ip']."', ".$_SESSION['id'].", '".$conn->real_escape_string($_POST['note'])."', ".$nolimits.")");

}

    ?>

<?php $mitsuba->admin->ui->startSection($lang['mod/manage_whitelist']); ?>

<?php echo $lang['mod/ip']; ?>

<?php echo $lang['mod/staff_note']; ?>

<?php echo $lang['mod/nolimits']; ?>

<?php echo $lang['mod/delete']; ?>

<?php

$result = $conn->query("SELECT * FROM whitelist ORDER BY id DESC;");

while ($row = $result->fetch_assoc())

{

    echo "
";

    echo "".$row['ip']."	";

    echo "".$row['note']."	";

    if ($row['nolimits'] == 1) {

        echo "YES	";

    } else {

        echo "NO	";

    }

    echo "".$lang['mod/delete']."	";

    echo "
";

}

?>

<?php $mitsuba->admin->ui->endSection(); ?>

<?php $mitsuba->admin->ui->startSection($lang['mod/add_whitelist']); ?>

<form action="?/whitelist&m=add" method="POST">

<?php $mitsuba->admin->ui->getToken($path); ?>

<?php echo $lang['mod/ip']; ?>: <input type="text" name="ip" />

<?php echo $lang['mod/staff_note']; ?>: <input type="text" name="note" />

<input type="checkbox" name="nolimits" value="1"/><?php echo $lang['mod/nolimits']; ?>

<input type="submit" value="<?php echo $lang['mod/submit']; ?>" />

</form>

<?php $mitsuba->admin->ui->endSection(); ?>


code:
<?php

if (!defined("IN_MOD")) {

    die("Nah, I won't serve that file to you.");

}

$mitsuba->admin->reqPermission("wordfilter.update");

if (!empty($_GET['n'])) {

    $result = $conn->query("SELECT * FROM wordfilter WHERE id=".$conn->real_escape_string($_GET['n']));

    if ($result->num_rows == 1) {

        $info = $result->fetch_assoc();

    ?>

    <?php $mitsuba->admin->ui->startSection($lang['mod/wf_edit']); ?>

  <form action="?/wordfilter" method="POST">

    <?php $mitsuba->admin->ui->getToken($path); ?>

  <input type="hidden" name="mode" value="edit">

  <input type="hidden" name="id" value="<?php echo $_GET['n']; ?>">

    <?php echo $lang['mod/wf_search']; ?>: <input type="text" name="search" value="<?php echo htmlspecialchars($info['search']); ?>"/>

    <?php echo $lang['mod/wf_replace']; ?>: <input type="text" name="replace" value="<?php echo htmlspecialchars($info['replace']); ?>"/>

    <?php $mitsuba->admin->ui->getBoardList($info['boards']); ?>

  <input type="submit" value="<?php echo $lang['mod/submit']; ?>" />

  </form>

    <?php $mitsuba->admin->ui->endSection(); ?>

    <?php

    }

}

?>


code:
<?php

if (!defined("IN_MOD")) {

    die("Nah, I won't serve that file to you.");

}

$mitsuba->admin->reqPermission("wordfilter.view");

        $search = "";

        $replace = "";

if ((!empty($_POST['mode'])) && ($_POST['mode'] == "add")) {

    $mitsuba->admin->reqPermission("wordfilter.add");

    $mitsuba->admin->ui->checkToken($_POST['token']);

    $continue = 0;

    if (empty($_POST['search'])) { echo "".$lang['mod/fill_all_fields']."";
    } else { $search = $_POST['search']; $continue = 1;
    }

    if (empty($_POST['replace'])) { echo "".$lang['mod/fill_all_fields']."";
    } else { $replace = $_POST['replace']; $continue = 1;
    }

    if ($continue == 1) {

        $search = $conn->real_escape_string($_POST['search']);

        $replace = $conn->real_escape_string($_POST['replace']);

        $boards = "";

        if ((!empty($_POST['all'])) && ($_POST['all']==1)) {

            $boards = "%";

        } else {

            if (!empty($_POST['boards'])) {

                foreach ($_POST['boards'] as $board)

                {

                    $boards .= $board.",";

                }

            } else {

                $board = "%";

            }

        }

        if ($boards != "%") { $boards = substr($boards, 0, strlen($boards) - 1);
        }

        $conn->query("INSERT INTO wordfilter (`search`, `replace`, `boards`, `active`, `regex`) VALUES ('".$search."', '".$replace."', '".$boards."', 1, 0);");

    }

    $search = "";

    $replace = "";

} elseif ((!empty($_POST['mode'])) && ($_POST['mode'] == "edit") && (!empty($_POST['id']))) {

    $mitsuba->admin->reqPermission("wordfilter.update");

    $mitsuba->admin->ui->checkToken($_POST['token']);

    $continue = 0;

    if (empty($_POST['search'])) { echo "".$lang['mod/fill_all_fields']."";
    } else { $search = $_POST['search']; $continue = 1;
    }

    if (empty($_POST['replace'])) { echo "".$lang['mod/fill_all_fields']."";
    } else { $replace = $_POST['replace']; $continue = 1;
    }

    if ($continue == 1) {

        $search = $conn->real_escape_string($_POST['search']);

        $id = $_POST['id'];

        if (!is_numeric($id)) { echo "".$lang['mod/fool']."";
        }

        $replace = $conn->real_escape_string($_POST['replace']);

        $boards = "";

        if ((!empty($_POST['all'])) && ($_POST['all']==1)) {

            $boards = "%";

        } else {

            if (!empty($_POST['boards'])) {

                foreach ($_POST['boards'] as $board)

                {

                    $boards .= $board.",";

                }

            } else {

                $board = "%";

            }

        }

        if ($boards != "%") { $boards = substr($boards, 0, strlen($boards) - 1);
        }

        $conn->query("UPDATE wordfilter SET `search`='".$search."', `replace`='".$replace."', `boards`='".$boards."' WHERE id=".$id);

    }

    $search = "";

    $replace = "";

}

if ((!empty($_GET['d'])) && ($_GET['d'] == 1) && (!empty($_GET['n']))) {

    $mitsuba->admin->reqPermission("wordfilter.delete");

    $n = $conn->real_escape_string($_GET['n']);

    if (!is_numeric($n)) { echo "".$lang['mod/fool']."";
    }

    $conn->query("DELETE FROM wordfilter WHERE id=".$n);

}

    ?>

<?php echo $lang['mod/rebuild_notice']; ?>

<?php $mitsuba->admin->ui->startSection($lang['mod/manage_wordfilter']); ?>

<?php echo $lang['mod/wf_search']; ?>

<?php echo $lang['mod/wf_replace']; ?>

<?php echo $lang['mod/boards']; ?>

<?php echo $lang['mod/actions']; ?>

<?php

$result = $conn->query("SELECT * FROM wordfilter ORDER BY boards,search ASC");

while ($row = $result->fetch_assoc())

{

    echo "
";

    echo "".htmlspecialchars($row['search'])."	";

    echo "".htmlspecialchars($row['replace'])."	";

    if ($row['boards']=="%") {

        echo "All boards	";

    } else {

        echo "".$row['boards']."	";

    }

    echo "".$lang['mod/delete']." ".$lang['mod/edit']."	";

    echo "
";

}

?>

<?php $mitsuba->admin->ui->endSection(); ?>

<?php $mitsuba->admin->ui->startSection($lang['mod/wf_add']); ?>

<form action="?/wordfilter" method="POST">

<?php $mitsuba->admin->ui->getToken($path); ?>

<input type="hidden" name="mode" value="add">

<?php echo $lang['mod/wf_search']; ?>: <input type="text" name="search" value="<?php echo htmlspecialchars($search); ?>"/>

<?php echo $lang['mod/wf_replace']; ?>: <input type="text" name="replace" value="<?php echo htmlspecialchars($replace); ?>"/>

<?php

$mitsuba->admin->ui->getBoardList();

?>

<input type="submit" value="<?php echo $lang['mod/submit']; ?>" />

</form>

<?php $mitsuba->admin->ui->endSection(); ?>


code:
<?php

$lang['img/error'] = "Error";

$lang['img/return'] = "RETURN";

$lang['img/no_board'] = "No board selected!";

$lang['img/board_no_exists'] = "This board does not exist!";

$lang['img/comment_too_long'] = "Comment too long(%s/%s)";

$lang['img/wait_more_post'] = "You'll have to wait more before posting a new post!";

$lang['img/wait_more_thread'] = "You'll have to wait more before posting a new thread!";

$lang['img/updating_index'] = "Updating index";

$lang['img/choose_one'] = "Choose one: image or embed! ;_;";

$lang['img/embed_not_supported'] = "Embed not supported!";

$lang['img/file_too_big'] = "File size is too big!";

$lang['img/file_not_img'] = "File is not an image!";

$lang['img/file_duplicate'] = "Duplicate file exists. here.";

$lang['img/file_uploaded'] = "The file %s has been uploaded";

$lang['img/upload_error'] = "There was an error uploading the file, please try again!";

$lang['img/no_thumb'] = "Could not create thumbnail!";

$lang['img/post_bad_password'] = "Bad password for post %s";

$lang['img/post_not_found'] = "Post %s not found";

$lang['img/post_no_image'] = "Post %s has no image";

$lang['img/post_deleted_image'] = "Deleted image from post %s";

$lang['img/post_deleted'] = "Deleted post %s";

$lang['img/post_wait_more'] = "You'll have to wait more before deleting post %s";

$lang['img/anonymous'] = "Anonymous";

$lang['img/appeal_sent'] = "Your appeal has been sent.";

$lang['img/no_file'] = "Error: No file selected.";

$lang['img/cant_reply'] = "Error: Cannot reply to thread because thread does not exist.";

$lang['img/thread_locked'] = "Error: This thread is locked.";

$lang['img/name'] = "Name";

$lang['img/fake_id'] = "Fake ID";

$lang['img/email'] = "Options";

$lang['img/subject'] = "Subject";

$lang['img/submit'] = "Submit";

$lang['img/comment'] = "Comment";

$lang['img/file'] = "File";

$lang['img/spoiler'] = "Spoiler Image?";

$lang['img/embed'] = "Embed";

$lang['img/password'] = "Password";

$lang['img/password_used'] = "(Password used for deletion)";

$lang['img/mod'] = "Mod";

$lang['img/mod_capcode'] = "Capcode";

$lang['img/mod_raw'] = "Raw HTML";

$lang['img/mod_sticky'] = "Sticky";

$lang['img/mod_lock'] = "Lock";

$lang['img/mod_nolimit'] = "Ignore bumplimit";

$lang['img/mod_nofile'] = "No file";

$lang['img/mod_nosizelimit'] = "Ignore filesize limit";

$lang['img/supported_types'] = "Supported file types are: ";

$lang['img/unique_user_posts'] = "Currently %s unique user posts.";

$lang['img/max_filesize'] = "Maximum file size allowed is %s.";

$lang['img/thumbnail'] = "Images greater than 250x250 pixels will be thumbnailed.";

$lang['img/locked'] = "This thread is locked.";

$lang['img/reply'] = "Reply";

$lang['img/posting_mode'] = "Posting mode: Reply";

$lang['img/return_c'] = "Return";

$lang['img/bottom'] = "Bottom";

$lang['img/top'] = "Top";

$lang['img/file_only'] = "File Only";

$lang['img/delete_post'] = "Delete post";

$lang['img/delete'] = "Delete";

$lang['img/reason'] = "Reason";

$lang['img/report'] = "Report";

$lang['img/style'] = "Style";

$lang['img/previous'] = "Previous";

$lang['img/next'] = "Next";

$lang['img/posts_omitted'] = "%s posts omitted. Click %shere%s to view.";

$lang['img/comment_long'] = "Comment too long. Click %shere%s to view the full text.";

$lang['img/post_reported'] = "Post %s reported.";

$lang['img/mod_nocapcode'] = "No capcode";

$lang['img/mod_customcapcode'] = "Custom capcode";

$lang['img/color'] = "Color";

$lang['img/text'] = "Text";

$lang['img/wrong_captcha'] = "You forgot to solve the Captcha, or let it expire. Please try again.";

$lang['img/captcha'] = "CAPTCHA";

$lang['img/click_here'] = "Click here";

$lang['img/new_captcha'] = "New CAPTCHA";

$lang['img/nolink'] = "You have to provide an URL";

$lang['img/badlink'] = "Bad URL";

$lang['img/badhostlink'] = "This host is not allowed";

$lang['img/replies_not_allowed'] = "Replies are not allowed in this board";

$lang['img/file_replies_not_allowed'] = "File replies are not allowed in this board";

$lang['img/url'] = "URL";


code:
<?php

$lang['img/error'] = "Błąd";

$lang['img/return'] = "POWRÓT";

$lang['img/no_board'] = "Nie wybrano boardu!";

$lang['img/board_no_exists'] = "Nie istnieje taki board!";

$lang['img/comment_too_long'] = "Post jest zbyt długi(%s/%s)";

$lang['img/wait_more_post'] = "Musisz poczekać trochę dłużej, aby móc ponownie zapostować!";

$lang['img/wait_more_post'] = "Musisz poczekać trochę dłużej, aby móc założyć następny temat!";

$lang['img/updating_index'] = "Trwa aktualizacja indeksu";

$lang['img/choose_one'] = "Wybierz jedno: obrazek lub embed! ;_;";

$lang['img/embed_not_supported'] = "Nieobsługiwany embed!";

$lang['img/file_too_big'] = "Przekroczony rozmiar obrazka!";

$lang['img/file_not_img'] = "Dany plik nie jest obrazkiem!";

$lang['img/file_duplicate'] = "Wykryto zduplikowany plik!";

$lang['img/file_uploaded'] = "Plik %s został załadowany";

$lang['img/upload_error'] = "Wystąpił błąd podczas wysyłania pliku, proszę spróbować jeszcze raz!";

$lang['img/no_thumb'] = "Nie można utworzyć miniaturki!";

$lang['img/post_bad_password'] = "Błędne hasło dla posta %s";

$lang['img/post_not_found'] = "Nie znaleziono posta %s";

$lang['img/post_no_image'] = "Post %s nie zawiera obrazka";

$lang['img/post_deleted_image'] = "Obrazek z posta %s został usunięty";

$lang['img/post_deleted'] = "Post %s został usunięty";

$lang['img/post_wait_more'] = "Musisz poczekać trochę dłużej, aby móc usunąć post %s";

$lang['img/anonymous'] = "Anonymous";

$lang['img/appeal_sent'] = "Twoja apelacja została wysłana.";

$lang['img/no_file'] = "Błąd: Nie wybrano pliku.";

$lang['img/cant_reply'] = "Błąd: Nie można odpowiedzieć w temacie, który już nie istnieje.";

$lang['img/thread_locked'] = "Błąd: Ten temat jest zablokowany.";

$lang['img/name'] = "Imię";

$lang['img/fake_id'] = "Fałszywy ID";

$lang['img/email'] = "E-mail";

$lang['img/subject'] = "Temat";

$lang['img/submit'] = "Wyślij";

$lang['img/comment'] = "Wiadomość";

$lang['img/file'] = "Plik";

$lang['img/spoiler'] = "Spoiler obrazkowy?";

$lang['img/embed'] = "Embed";

$lang['img/password'] = "Hasło";

$lang['img/password_used'] = "(Hasło do usuwania)";

$lang['img/mod'] = "Mod";

$lang['img/mod_capcode'] = "Capcode";

$lang['img/mod_raw'] = "Surowy HTML";

$lang['img/mod_sticky'] = "Przyklejony";

$lang['img/mod_lock'] = "Zablokowany";

$lang['img/mod_nolimit'] = "Ignoruj limit bumpów";

$lang['img/mod_nofile'] = "Bez pliku";

$lang['img/mod_nosizelimit'] = "Ignoruj limit rozmiaru pliku";

$lang['img/supported_types'] = "Obsługiwane typy plików to: ";

$lang['img/unique_user_posts'] = "Aktualnie %1 postów od unikalnych użytkowników.";

$lang['img/max_filesize'] = "Maksymalny rozmiar pliku wynosi %s.";

$lang['img/thumbnail'] = "Obrazki o wymiarach większych niż 250x250 pikseli zostaną pomniejszone.";

$lang['img/locked'] = "Ten temat jest zablokowany.";

$lang['img/reply'] = "Odpowiedź";

$lang['img/posting_mode'] = "Tryb postowania: Odpowiedź";

$lang['img/return_c'] = "Powrót";

$lang['img/bottom'] = "Dół";

$lang['img/top'] = "Góra";

$lang['img/file_only'] = "Tylko plik";

$lang['img/delete_post'] = "Usuń post";

$lang['img/delete'] = "Usuń";

$lang['img/reason'] = "Powód";

$lang['img/report'] = "Raportuj";

$lang['img/style'] = "Styl";

$lang['img/previous'] = "Wstecz";

$lang['img/next'] = "Dalej";

$lang['img/posts_omitted'] = "%s postów pominięto. Kliknij %stutaj%s, aby zobaczyć.";

$lang['img/comment_long'] = "Wiadomość jest zbyt długa. Kliknij %stutaj%s, aby zobaczyć ją w całości.";

$lang['img/post_reported'] = "Post %s został zaraportowany.";

$lang['img/mod_nocapcode'] = "Bez capcode'u";

$lang['img/mod_customcapcode'] = "Capcode personalizowany";

$lang['img/color'] = "Kolor";

$lang['img/text'] = "Tekst";

$lang['img/wrong_captcha'] = "Wprowadzono błędny kod CAPTCHA";

$lang['img/captcha'] = "CAPTCHA";

$lang['img/click_here'] = "Kliknij tutaj";

$lang['img/new_captcha'] = "Nowa CAPTCHA";

$lang['img/nolink'] = "Musisz wprowadzić URL";

$lang['img/badlink'] = "Nieprawidłowy URL";

$lang['img/badhostlink'] = "Ten host jest niedozwolony";

$lang['img/replies_not_allowed'] = "Odpowiedzi nie są dozwolone na tym boardzie";

$lang['img/file_replies_not_allowed'] = "Odpowiedzi z plikiem nie są dozwolone na tym boardzie";

$lang['img/url'] = "URL";

?>


code:
<?php

$lang['log/logged_in'] = "User logged from IP: %s";

$lang['log/ip_changed'] = "User's IP address has changed: %s --> %s";

$lang['log/user_added'] = "Added user %s";

$lang['log/user_deleted'] = "Deleted user %s";

$lang['log/changed_username'] = "Changed username of user %s to %s";

$lang['log/edited_user'] = "Edited user's data: %s";

$lang['log/added_board'] = "Added board: /%s/";

$lang['log/deleted_board'] = "Deleted board: /%s/";

$lang['log/moved_board'] = "Moved board: /%s/ --> /%s/";

$lang['log/updated_board'] = "Updated board's data: /%s/";

$lang['log/rebuilt_board'] = "Rebuilt board's cache: /%s/";

$lang['log/rebuilt_cache'] = "Rebuilt cache";

$lang['log/rebuilt_thumbs'] = "Rebuilt thumbnails";


code:
<?php

$lang['mod/not_logged_in'] = "Not Logged in!";

$lang['mod/log_in'] = "Log in";

$lang['mod/username'] = "Username";

$lang['mod/password'] = "Password";

$lang['mod/bad_password'] = "Incorrect info. Try again.";

$lang['mod/logged_in_as'] = "You are logged in as ";

$lang['mod/privileges'] = "Privileges: ";

$lang['mod/administrator'] = "Administrator";

$lang['mod/moderator'] = "Moderator";

$lang['mod/janitor'] = "Janitor";

$lang['mod/faggot'] = "Faggot";

$lang['mod/logout'] = "Logout";

$lang['mod/general'] = "General";

$lang['mod/announcements'] = "Announcements";

$lang['mod/news'] = "News";

$lang['mod/banlist'] = "Banlist";

$lang['mod/report_queue'] = "Report queue";

$lang['mod/notes'] = "Notes";

$lang['mod/ip_notes'] = "IP notes";

$lang['mod/recent_posts'] = "Recent posts";

$lang['mod/recent_images'] = "Recently uploaded images";

$lang['mod/ban_requests'] = "Ban requests";

$lang['mod/new_announcement'] = "New announcement";

$lang['mod/add_news'] = "Add news entry";

$lang['mod/add_ban'] = "Add new ban";

$lang['mod/locked'] = "Locked threads";

$lang['mod/sticky'] = "Sticky threads";

$lang['mod/appeals'] = "Ban appeals";

$lang['mod/account'] = "Your account";

$lang['mod/change_password'] = "Change password";

$lang['mod/inbox'] = "Inbox";

$lang['mod/send_message'] = "Compose Message";

$lang['mod/administration'] = "Administration";

$lang['mod/configuration'] = "Configuration";

$lang['mod/manage_boards'] = "Manage boards";

$lang['mod/manage_board_links'] = "Manage Boardlinks";

$lang['mod/manage_users'] = "Manage users";

$lang['mod/manage_whitelist'] = "Manage whitelist";

$lang['mod/manage_news_entries'] = "Manage news entries";

$lang['mod/manage_announcements'] = "Manage announcements";

$lang['mod/manage_bbcodes'] = "Manage BBCodes";

$lang['mod/manage_embeds'] = "Manage embeds";

$lang['mod/manage_styles'] = "Manage styles";

$lang['mod/manage_wordfilter'] = "Manage wordfilter";

$lang['mod/manage_spamfilter'] = "Manage spamfilter";

$lang['mod/manage_range_bans'] = "Manage range bans";

$lang['mod/global_message'] = "Global message";

$lang['mod/rebuild_cache'] = "Rebuild cache";

$lang['mod/action_log'] = "Action log";

$lang['mod/boards'] = "Boards";

$lang['mod/edit'] = "Edit";

$lang['mod/delete'] = "Delete";

$lang['mod/new_user'] = "New user";

$lang['mod/type'] = "Type";

$lang['mod/all'] = "All";

$lang['mod/add_user'] = "Add user";

$lang['mod/all_users'] = "All users";

$lang['mod/by'] = "By";

$lang['mod/title'] = "Title";

$lang['mod/text'] = "Text";

$lang['mod/submit'] = "Submit";

$lang['mod/your_entries'] = "Your entries";

$lang['mod/date'] = "Date";

$lang['mod/post_added'] = "Post added";

$lang['mod/back'] = "[ BACK ]";

$lang['mod/edit_announcement'] = "Edit announcement";

$lang['mod/post_updated'] = "Post updated";

$lang['mod/all_announcements'] = "All announcements";

$lang['mod/edit_news_entry'] = "Edit news entry";

$lang['mod/all_news_entries'] = "All news entries";

$lang['mod/board_created'] = "Board created";

$lang['mod/board_exists_mysql_error'] = "Board exists or MySQL error";

$lang['mod/fill_all_fields'] = "
Please, fill in all fields!

";

$lang['mod/create_new_board'] = "Create new board";

$lang['mod/board_directory'] = "Board directory (without /'s)";

$lang['mod/board_name'] = "Board name";

$lang['mod/board_short'] = "Board Meta Description (will show up on Search engines etc)";

$lang['mod/board_msg'] = "Board Description (optional)";

$lang['mod/board_limit'] = "Board bumplimit (optional, 0 for no limit)";

$lang['mod/board_options'] = "Board special options";

$lang['mod/board_spoilers'] = "Allow image spoilers";

$lang['mod/board_no_name'] = "No name field (forced anonymity)";

$lang['mod/board_ids'] = "Poster IDs";

$lang['mod/board_embeds'] = "Allow embeds";

$lang['mod/board_catalog'] = "Enable catalog";

$lang['mod/board_captcha'] = "Enable captcha";

$lang['mod/board_all_links'] = "Allow to post any link";

$lang['mod/board_type'] = "Board type";

$lang['mod/board_files'] = "Maximum files";

$lang['mod/board_nofile'] = "Allow 'No file' for OPs";

$lang['mod/board_allow_replies'] = "Allow replies";

$lang['mod/board_allow_file_replies'] = "Allow file replies";

$lang['mod/extensions'] = "Extensions";

$lang['mod/overboard'] = "Overboard";

$lang['mod/imageboard'] = "Imageboard";

$lang['mod/fileboard'] = "File listing board";

$lang['mod/linkboard'] = "Link listing board";

$lang['mod/textboard'] = "Textboard";

$lang['mod/archive'] = "Archive (DO NOT USE!!)";

$lang['mod/all_boards'] = "All boards";

$lang['mod/directory'] = "Directory";

$lang['mod/name'] = "Name";

$lang['mod/description'] = "Description";

$lang['mod/bump_limit'] = "Bump limit";

$lang['mod/message'] = "Message";

$lang['mod/special'] = "Special";

$lang['mod/yes'] = "Yes";

$lang['mod/no'] = "No";

$lang['mod/spoilers'] = "Image spoilers";

$lang['mod/noname'] = "No name";

$lang['mod/ids'] = "Poster IDs";

$lang['mod/embeds'] = "Embeds";

$lang['mod/yes_big'] = "[ YES ]";

$lang['mod/no_big'] = "[ NO ]";

$lang['mod/board_cache_rebuilded'] = "Board's cache rebuilded!";

$lang['mod/board_not_found'] = "Board not found!";

$lang['mod/board_deleted'] = "Board deleted!";

$lang['mod/want_delete_board'] = "Do you want to delete /%s/?";

$lang['mod/board_updated'] = "Board updated successfully!";

$lang['mod/some_error'] = "Some sort of error happened ;_;";

$lang['mod/board_moved'] = "Board moved!";

$lang['mod/board_exists'] = "The board /%s/ does exist!";

$lang['mod/board_not_exists'] = "The board /%s/ does not exist!";

$lang['mod/edit_board'] = "Edit board /%s/";

$lang['mod/move_board'] = "Move board /%s/";

$lang['mod/board_new_dir'] = "New board directory (without /'s)";

$lang['mod/pwd_no_match'] = "Password does not match the password in database!";

$lang['mod/pwd_updated'] = "Password updated";

$lang['mod/pwd_wrong'] = "Passwords don't match!";

$lang['mod/pwd_change'] = "Change your password";

$lang['mod/pwd_current'] = "Current password";

$lang['mod/pwd_new'] = "New password";

$lang['mod/pwd_confirm'] = "Confirm new password";

$lang['mod/board_links'] = "Board links";

$lang['mod/all_static'] = "All static pages";

$lang['mod/boards_json'] = "Boards JSON";

$lang['mod/rebuild_static'] = "Rebuild static pages";

$lang['mod/frontpage'] = "Frontpage";

$lang['mod/news_page'] = "News page";

$lang['mod/rebuilding_done'] = "Rebuilding done";

$lang['mod/rebuild_notice'] = "You'll have to rebuild board cache after modifying settings here.";

$lang['mod/add_link_category'] = "Add link category";

$lang['mod/category'] = "Category";

$lang['mod/add_link'] = "Add link";

$lang['mod/edit_link'] = "Edit link";

$lang['mod/short'] = "Short";

$lang['mod/url'] = "URL (board index)";

$lang['mod/url_thread'] = "URL in-thread (optional)";

$lang['mod/url_index'] = "URL on frontpage (optional)";

$lang['mod/global_message_updated'] = "Global message updated";

$lang['mod/edit_global_message'] = "Edit global message";

$lang['mod/bans'] = "Bans";

$lang['mod/ip'] = "IP";

$lang['mod/reason'] = "Reason";

$lang['mod/staff_note'] = "Staff note";

$lang['mod/staff_member'] = "Staff member";

$lang['mod/created'] = "Created";

$lang['mod/expires'] = "Expires";

$lang['mod/showing_bans'] = "Showing recent %s bans.";

$lang['mod/show_all'] = "Show all";

$lang['mod/show_recent'] = "Show recent %s";

$lang['mod/all_bans'] = "All bans";

$lang['mod/recent_bans'] = "Recent %s bans";

$lang['mod/expires_eg'] = "Expires (e.g. 1d, 20s)";

$lang['mod/appeal_in'] = "Appeal";

$lang['mod/add_ban_request'] = "Add new ban request";

$lang['mod/append_text'] = "Append text to post";

$lang['mod/will_delete'] = "POST WILL BE DELETED";

$lang['mod/ip_syntax_wrong'] = "IP syntax wrong!";

$lang['mod/user_banned'] = "User banned!";

$lang['mod/request_sent'] = "Request sent!";

$lang['mod/filled_wrong'] = "Form filled wrong";

$lang['mod/range_bans'] = "Range bans";

$lang['mod/all_range_bans'] = "All range bans";

$lang['mod/add_range_ban'] = "Add range ban";

$lang['mod/recent_range_bans'] = "Recent %s range bans";

$lang['mod/user_deleted'] = "User deleted!";

$lang['mod/user_not_exists'] = "This user does not exist!";

$lang['mod/user_want_delete'] = "Do you want to delete this user?";

$lang['mod/user_added'] = "User added!";

$lang['mod/user_exists'] = "User already exists!";

$lang['mod/user_updated'] = "User updated!";

$lang['mod/edit_user'] = "Edit user";

$lang['mod/password_leave_blank'] = "Password (leave blank to not change)";

$lang['mod/add_note'] = "Add note";

$lang['mod/note_added'] = "Note added";

$lang['mod/note_deleted'] = "Note deleted";

$lang['mod/error'] = "Error";

$lang['mod/post'] = "Post";

$lang['mod/file'] = "File";

$lang['mod/comment'] = "Comment";

$lang['mod/reporter_ip'] = "Reporter IP";

$lang['mod/actions'] = "Actions";

$lang['mod/want_clear_reports'] = "Do you want to clear all reports?";

$lang['mod/want_delete_post'] = "Do you want to delete this post?";

$lang['mod/file_deleted'] = "File deleted";

$lang['mod/post_deleted_short'] = "Post deleted";

$lang['mod/ip_info'] = "Information about %s";

$lang['mod/search_ip'] = "Search for posts by this IP";

$lang['mod/recent_bans_ip'] = "Recent %s bans for this IP:";

$lang['mod/notes_ip'] = "Notes for this IP:";

$lang['mod/note'] = "Note";

$lang['mod/recent_ip_notes'] = "Recent IP notes";

$lang['mod/showing_notes'] = "Showing recent %s notes. ";

$lang['mod/add_ip_note'] = "Add IP note";

$lang['mod/all_ip_notes'] = "All IP notes";

$lang['mod/no_ip'] = "No IP provided or IP wrong";

$lang['mod/ip_note_added'] = "IP note added";

$lang['mod/unstickied'] = "Thread unstickied";

$lang['mod/stickied'] = "Thread stickied";

$lang['mod/thread_not_found'] = "Thread not found";

$lang['mod/t_unlocked'] = "Thread unlocked";

$lang['mod/t_locked'] = "Thread locked";

$lang['mod/ab_off'] = "Antibump off";

$lang['mod/ab_on'] = "Antibump on";

$lang['mod/id'] = "ID";

$lang['mod/unlock'] = "Unlock";

$lang['mod/unstick'] = "Unstick";

$lang['mod/your_notes'] = "Your notes";

$lang['mod/reports'] = "Reports";

$lang['mod/clear_all'] = "Clear all";

$lang['mod/ban_reason'] = "Ban reason";

$lang['mod/days_left'] = "Days left";

$lang['mod/e_mail'] = "E-mail";

$lang['mod/appeal_text'] = "Appeal text";

$lang['mod/permaban'] = "permaban";

$lang['mod/want_clear_appeals'] = "Do you want to clear all appeals?";

$lang['mod/frontpage_style'] = "Frontpage style";

$lang['mod/frontpage_url'] = "Frontpage URL";

$lang['mod/frontpage_menu_url'] = "Frontpage menu URL";

$lang['mod/news_url'] = "News URL";

$lang['mod/sitename'] = "Sitename";

$lang['mod/from'] = "From";

$lang['mod/msg_sent'] = "Message sent";

$lang['mod/user_not_found'] = "User not found!";

$lang['mod/to'] = "To";

$lang['mod/read_msg'] = "Read message";

$lang['mod/showing_posts'] = "Showing posts by IP %s";

$lang['mod/delete_ip'] = "Delete posts from this IP";

$lang['mod/subject'] = "Subject";

$lang['mod/want_delete_ip'] = "Do you want to delete posts from IP %s?";

$lang['mod/posts_deleted'] = "Posts deleted.";

$lang['mod/recent_n_posts'] = "Recent %s posts";

$lang['mod/show_recent_none'] = "Show recent";

$lang['mod/recent_n_posts_images'] = "Recent %s posts with images";

$lang['mod/showing_requests'] = "Showing recent %s ban requests.";

$lang['mod/name_error'] = "Name must consist of alphanumeric characters and it may not contain spaces!";

$lang['mod/bbcode'] = "BBCode";

$lang['mod/html_code'] = "HTML Code";

$lang['mod/add_bbcode'] = "Add BBCode";

$lang['mod/edit_bbcode'] = "Edit BBCode";

$lang['mod/regex'] = "Regex";

$lang['mod/add_embed'] = "Add embed";

$lang['mod/edit_embed'] = "Edit embed";

$lang['mod/no_file'] = "
No file selected ;_;

";

$lang['mod/style_uploaded'] = "Stylesheet uploaded.";

$lang['mod/fool'] = "Don't try to fool me!";

$lang['mod/default'] = "default";

$lang['mod/delete_no_file'] = "No file"; //in context - without file/excluding file

$lang['mod/make_default'] = "Make default";

$lang['mod/upload_style'] = "Upload stylesheet";

$lang['mod/edit_post'] = "Edit post";

$lang['mod/options'] = "Options";

$lang['mod/raw_html'] = "Raw HTML";

$lang['mod/board_bbcode'] = "Allow BBCode";

$lang['mod/board_pages'] = "Board pages";

$lang['mod/board_time_between_posts'] = "Time between posts (seconds)";

$lang['mod/board_time_between_threads'] = "Time between threads (seconds)";

$lang['mod/board_time_to_delete'] = "Time user has wait to delete post (seconds)";

$lang['mod/board_filesize'] = "Maximum filesize (bytes)";

$lang['mod/thumbnails'] = "Thumbnails";

$lang['mod/cleaner'] = "Cleaner";

$lang['mod/delete_expired_bans'] = "Delete expired bans";

$lang['mod/delete_deleted_posts'] = "Delete deleted posts (database)";

$lang['mod/cleaning_done'] = "Cleaning done";

$lang['mod/config_updated'] = "Configuration updated";

$lang['mod/board_hidden'] = "Hidden board";

$lang['mod/board_unlisted'] = "Unlisted board";

$lang['mod/board_nodup'] = "No duplicate files";

$lang['mod/nolimits'] = "No limits";

$lang['mod/wait_thread'] = "You'll have to wait more before posting a new thread!";

$lang['mod/wait_post'] = "You'll have to wait more before posting a new post!";

$lang['mod/add_whitelist'] = "Add IP to whitelist";

$lang['mod/board_maxchars'] = "Maximum characters for single post";

$lang['mod/enable_api'] = "Enable API";

$lang['mod/enable_meny'] = "Enable Meny";

$lang['mod/wf_search'] = "Search"; //wordfilter

$lang['mod/wf_replace'] = "Replace"; //wordfilter

$lang['mod/wf_add'] = "Add wordfilter";

$lang['mod/wf_edit'] = "Edit wordfilter";

$lang['mod/sf_add'] = "Add spamfilter";

$lang['mod/sf_edit'] = "Edit spamfilter";

$lang['mod/show_file'] = "Show file";

$lang['mod/user'] = "User";

$lang['mod/action'] = "Action";

$lang['mod/reply'] = "Reply";

$lang['mod/outbox'] = "Outbox";

$lang['mod/board_default_name'] = "Default name";

$lang['mod/disabled'] = "Disabled";

$lang['mod/add_warning'] = "Add warning";

$lang['mod/user_warned'] = "User warned";

$lang['mod/warnings'] = "Warnings";

$lang['mod/all_warnings'] = "All warnings";

$lang['mod/recent_warnings'] = "Recent %s warnings";

$lang['mod/showing_warnings'] = "Showing recent %s warnings.";

$lang['mod/shown'] = "Shown";

$lang['mod/seen'] = "Seen";

$lang['mod/delete_shown_warnings'] = "Delete shown warnings";

$lang['mod/caching_mode'] = "Caching mode";

$lang['mod/normal'] = "Normal";

$lang['mod/super_caching'] = "Super Caching™";

$lang['mod/apc'] = "APC";

$lang['mod/apc_memcached'] = "APC + memcached";

$lang['mod/all_pages'] = "All pages";

$lang['mod/edit_page'] = "Edit page";

$lang['mod/page_updated'] = "Page updated";

$lang['mod/add_page'] = "Add page";

$lang['mod/manage_pages'] = "Manage pages";

$lang['mod/page_wrong_name'] = "You can't give this name to a page";

$lang['mod/relativity'] = "Relativity";

$lang['mod/absolute'] = "Absolute";

$lang['mod/relative'] = "Relative (to board index/mod.php)";

$lang['mod/board_link'] = "Board link (replace URL with board 'short')";

$lang['mod/extras'] = "Extras";

$lang['mod/captcha_enable_all'] = "Enable CAPTCHA on all boards";

$lang['mod/captcha_disable_all'] = "Disable CAPTCHA on all boards";

$lang['mod/catalog_enable_all'] = "Enable catalog on all boards";

$lang['mod/catalog_disable_all'] = "Disable catalog on all boards";

$lang['mod/manage_ads'] = "Manage ads";

$lang['mod/board'] = "Board";

$lang['mod/position'] = "Position";

$lang['mod/edit_ad'] = "Edit ad";

$lang['mod/add_ad'] = "Add ad";

$lang['mod/pos_head'] = "<head> tag";

$lang['mod/pos_aboveform'] = "Above posting form";

$lang['mod/pos_underform'] = "Under posting form";

$lang['mod/pos_footer'] = "Above style select/delete form";

$lang['mod/pos_bottom'] = "Above </body>";

$lang['mod/pos_rules'] = "Posting form (rules)";

$lang['mod/ad_not_found'] = "Ad not found";

$lang['mod/manage_modules'] = "Manage modules";

$lang['mod/uninstalled_modules'] = "Uninstalled modules";

$lang['mod/upload_module'] = "Upload module";

$lang['mod/module_uploaded'] = "Module uploaded";

$lang['mod/install'] = "Install";

$lang['mod/uninstall'] = "Uninstall";

$lang['mod/author'] = "Author";

$lang['mod/version'] = "Version";

$lang['mod/invalid_module'] = "Invalid module file";

$lang['mod/module_dir_exists'] = "Directory ./modules/%s/ exists!";

$lang['mod/module_dir_does_not_exist'] = "Directory ./modules/%s/ does not exist!";

$lang['mod/module_no_file'] = "Module's directory is lacking at least one file!";

$lang['mod/invalid_module_json'] = "Invalid module.json file";

$lang['mod/module_installed'] = "Module installed";

$lang['mod/module_uninstalled'] = "Module uninstalled";

$lang['mod/module_deleted'] = "Module deleted";

$lang['mod/module_already_installed'] = "Module already installed";

$lang['mod/module_not_installed'] = "Module not installed";

$lang['mod/module_install_error'] = "Error when installing module: ";

$lang['mod/module_uninstall_error'] = "Error when uninstalling module: ";

$lang['mod/module_post_field_conflict'] = "Post field %s already exists!";

$lang['mod/module_board_field_conflict'] = "Board field %s already exists!";

$lang['mod/module_permission_conflict'] = "Permission %s already exists!";

$lang['mod/module_config_conflict'] = "Field %s already exists!";

$lang['mod/module_table_conflict'] = "Table %s already exists!";

$lang['mod/module_installed_delete'] = "Before deleting module you have to uninstall it!";

//$lang['mod/'] = "";


code:
<?php

/*

 *  Class for handling webm files around the MitsubaBBS Project

 *  Copyright (C) 2014  Malkovich <chlodnapiwnica@gmail.com>

 *

 *  This program is free software: you can redistribute it and/or modify

 *  it under the terms of the GNU Affero General Public License as

 *  published by the Free Software Foundation, either version 3 of the

 *  License, or (at your option) any later version.

 *

 *  This program is distributed in the hope that it will be useful,

 *  but WITHOUT ANY WARRANTY; without even the implied warranty of

 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the

 *  GNU Affero General Public License for more details.

 *

 *  You should have received a copy of the GNU Affero General Public License

 *  along with this program.  If not, see <http://www.gnu.org/licenses/>.

 *

*/

/**
 * webm
 * Insert description here
 *
 * @category
 * @package
 * @author
 * @copyright
 * @license
 * @version
 * @link
 * @see
 * @since
 */
class webm
{

    /* Public variables */

    public $codec; //codec used to create thumbnail

    public $max_time; //maximum time for thumbnail

    public $font_name; //font used for overlay text

    /* private properties */

    private $input_file; //orginal webm movie

    private $exec_string; //commandline for ffmpeg

    /**
     * webm
     * Insert description here
     *
     * @param $webm_clip_name
     *
     * @return
     *
     * @access
     * @static
     * @see
     * @since
     */
    function webm($webm_clip_name)
    {

        $this->codec = 'vp8'; //used only in .webm thumbnail option

        $this->input_file = $webm_clip_name;

        $this->max_time = '00:00:05';

    }

    /**
     * thumbnail
     * Insert description here
     *
     * @param $thumbnail_location
     * @param $max_w
     * @param $max_h
     * @param $overlay
     *
     * @return
     *
     * @access
     * @static
     * @see
     * @since
     */
    function thumbnail($thumbnail_location, $max_w = 125, $max_h = 125, $overlay = "webm")
    {

        $ext = strtolower(pathinfo($thumbnail_location, PATHINFO_EXTENSION));

        switch ($ext) {

        case 'webm':
        	putenv("LD_LIBRARY_PATH=/usr/local/lib");
            $this->exec_string = '/usr/bin/ffmpeg -i ' . $this->input_file . ' -vcodec ' . $this->codec . ' -an' . ' -t ' . $this->max_time . " -vf scale=\"'if(gte(iw,ih),$max_w,-1)':'if(gte(iw,ih),-1,$max_h)'\",drawtext=\"fontfile=/usr/share/fonts/truetype/ttf-dejavu/DejaVuSans.ttf:  text='$overlay': fontcolor=white: x=2: y=(h-text_h)\" " . ' -y ' . $thumbnail_location . ' </dev/null 2>&1';

            break;

        case 'gif':
            //$this->exec_string = 'ffmpeg -i ' . $this->input_file . ' -t ' . $this->max_time . ' -r 10 ' . " -vf scale=\"'if(gte(iw,ih),$max_w,-1)':'if(gte(iw,ih),-1,$max_h)'\",drawtext=\"fontfile=/usr/share/fonts/truetype/ttf-dejavu/DejaVuSans.ttf:  text='$overlay': fontcolor=white: x=2: y=(h-text_h)\" " . ' -y ' . $thumbnail_location . ' </dev/null 2>&1';
            //$this->exec_string = "ffmpeg -i {$this->input_file} 2>&1";
            $this->exec_string = '/usr/bin/ffmpeg -i '.$this->input_file.
            ' -t '.$this->max_time.
            ' -r 10 '.
            " -vf scale=\"'if(gte(iw,ih),$max_w,-1)':'if(gte(iw,ih),-1,$max_h)'\"".
            ' -y '.$thumbnail_location.
            ' </dev/null 2>&1';
            break;

        }

        exec($this->exec_string, $output, $return_var);
        if ($return_var == 0) {

            return true;

        } else {

            return false;

        }

    }

    /*

     *    check for VP8 format

    */

    /**
     * valid_webm
     * Insert description here
     *
     * @return
     *
     * @access
     * @static
     * @see
     * @since
     */
    function valid_webm()
    {

        $this->exec_string = '/usr/bin/ffmpeg -i ' . $this->input_file . ' </dev/null 2>&1';

        $lines = shell_exec($this->exec_string);

        $lines = explode("\n", $lines);

        $found = false;

        foreach ($lines as $line) {

            if (preg_match('/Stream.+#\d:\d.+Video.+vp8/i', $line)) {

                $found = true;

            }

        }

        return $found;

    }

}


code:
<?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);
    $IPAddress = $haruko->common->getIP();
    $sql = "SELECT `ip`, COUNT(*) AS `num_posts`, round((COUNT(*) / (SELECT COUNT(*) from `posts`))* 100) AS `percent` FROM `posts` WHERE `ip` = '".$IPAddress."'";
if(!$result = $conn->query($sql)) {

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

}else{

    while($row2 = $result->fetch_assoc()){

        echo("<pre>");
        if($row2["ip"]) {
            unset($row2["ip"]);
        }
        /*if($row2["password"]) {
            unset($row2["password"]);
        }
        if($row2['resto'] == "0") {
            $row2['resto'] = $row2['id'];
        }*/
        echo json_encode($row2);
        echo("</pre>");

    }

}
?>