Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Stud.IP
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Marcus Eibrink-Lunzenauer
Stud.IP
Commits
c5f959fe
Commit
c5f959fe
authored
1 year ago
by
Jan-Hendrik Willms
Browse files
Options
Downloads
Patches
Plain Diff
re #3183
Merge request
studip/studip!2424
parent
4aa40f97
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
app/controllers/bb.php
+0
-48
0 additions, 48 deletions
app/controllers/bb.php
app/views/bb/index.php
+0
-39
0 additions, 39 deletions
app/views/bb/index.php
with
0 additions
and
87 deletions
app/controllers/bb.php
deleted
100644 → 0
+
0
−
48
View file @
4aa40f97
<?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
);
}
}
This diff is collapsed.
Click to expand it.
app/views/bb/index.php
deleted
100644 → 0
+
0
−
39
View file @
4aa40f97
<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
()
?>
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment