aboutsummaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorJan-Hendrik Willms <tleilax+studip@gmail.com>2023-12-05 15:17:29 +0000
committerJan-Hendrik Willms <tleilax+studip@gmail.com>2023-12-05 15:17:29 +0000
commitc5f959fef9c18529c81e80d2d84cacbe9962d711 (patch)
tree9a64e2177cec3b9f68bce760e5a946e11418028d /app
parent4aa40f97beafc840beb4e96288da6b140424711d (diff)
re #3183
Merge request studip/studip!2424
Diffstat (limited to 'app')
-rw-r--r--app/controllers/bb.php48
-rw-r--r--app/views/bb/index.php39
2 files changed, 0 insertions, 87 deletions
diff --git a/app/controllers/bb.php b/app/controllers/bb.php
deleted file mode 100644
index b7a3f87..0000000
--- a/app/controllers/bb.php
+++ /dev/null
@@ -1,48 +0,0 @@
-<?php
-
-# Lifter010: TODO
-/**
- * vote.php - Votecontroller controller
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of
- * the License, or (at your option) any later version.
- */
-
-class BbController extends AuthenticatedController {
-
- function before_filter(&$action, &$args)
- {
- parent::before_filter($action, $args);
-
- if (!$GLOBALS['perm']->have_perm('root')) {
- throw new AccessDeniedException();
- }
- }
-
- public function index_action($page = 1)
- {
- $this->entries_per_page = Request::int('entries_per_page', 20);
-
- $images = [];
-
- foreach (scandir($GLOBALS['DYNAMIC_CONTENT_PATH'] . '/user') as $file) {
- if (mb_strpos($file, '_normal.png') !== FALSE && $file !== 'nobody_normal.png') {
- $images[] = [
- 'time' => @filemtime($GLOBALS['DYNAMIC_CONTENT_PATH'] . '/user/'.$file),
- 'file' => $file,
- 'user_id' => mb_substr($file, 0, mb_strrpos($file, '_'))];
- }
- }
-
- usort($images, function($b, $a) {
- return $a['time'] - $b['time'];
- });
-
- $this->entries = sizeof($images);
- $this->page = $page;
- $this->images = array_slice($images, $this->entries_per_page * ($page - 1), $this->entries_per_page);
- }
-
-}
diff --git a/app/views/bb/index.php b/app/views/bb/index.php
deleted file mode 100644
index 84c973b..0000000
--- a/app/views/bb/index.php
+++ /dev/null
@@ -1,39 +0,0 @@
-<table cellspacing="0" cellpadding="0" border="0" width="100%">
- <tr>
- <td class="table_header_bold" colspan=2>
- <b><?=_("Der geheime Bilderbrowser")?></b>
- </td>
- </tr>
-</table>
-
-<br><br>
-<?=_("Unschön dass wir uns hier sehen... diese Seite ist das geheime Easteregg von Stud.IP. Wenn es jemand hierher geschafft hat, der nicht zum Team gehört, dann kündige ich.")?>
-<br><br>
-<i>Cornelis</i><br><br>
-
-<?
- $pagination = $GLOBALS['template_factory']->open('shared/pagechooser');
- $pagination->set_attributes([
- 'perPage' => $entries_per_page,
- 'num_postings' => $entries,
- 'page' => $page,
- 'pagelink' => $controller->url_for('bb/index/%u')
- ]);
- echo $pagination->render();
-?>
-<br><br>
-
-<? foreach ($images as $image) : ?>
- <div style="float: left; width: 250px; border: 1px solid gray; padding: 5px; text-align: center; font-weight: bold; margin: 5px;">
- <a href="<?= URLHelper::getLink('dispatch.php/profile?username='. get_username($image['user_id'])) ?>">
- <img border="0" src="<?= $GLOBALS['DYNAMIC_CONTENT_URL'] . '/user/' . $image['file'] ?>">
- <br>
- <?= get_fullname($image['user_id'], 'full' ,true) ?><br>
- <?= date('d.m.Y', $image['time']) ?>
- </a>
- </div>
-<? endforeach ?>
-
-<br style="clear: both">
-<br>
-<?= $pagination->render() ?>