blob: 54ebd6a277182cf1659aab90b52439dac23c4bdc (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
|
<?php
/**
* Elgg report content listing
*
* @package ElggReportContent
* @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
* @author Curverider <info@elgg.com>
* @copyright Curverider Ltd 2008-2010
* @link http://elgg.org/
*/
if($vars['entity']){
$id = 0;
foreach($vars['entity'] as $report){
// increment our id counter
$id++;
//get the user making the report
$user = get_user($report->owner_guid)->name;
$user_url = get_user($report->owner_guid)->getURL();
//find out if the report is current or archive
if($report->state == 'archived'){
$reportedcontent_background = "archived_report";
}else{
$reportedcontent_background = "active_report";
}
echo "<div class='admin_settings reported_content {$reportedcontent_background}'>";
echo "<div class='clearfloat controls'>";
if($report->state != 'archived')
echo "<a class='action_button' href=\"" . elgg_validate_action_url($vars['url'] . "action/reportedcontent/archive?item={$report->guid}") . "\">" . elgg_echo('reportedcontent:archive') . "</a>";
echo "<a class='action_button disabled' href=\"" . elgg_validate_action_url($vars['url'] . "action/reportedcontent/delete?item={$report->guid}") . "\" onclick=\"return confirm('" . elgg_echo('reportedcontent:areyousure') . "')\">" . elgg_echo('reportedcontent:delete') . "</a></div>";
echo "<p><b>" . elgg_echo('reportedcontent:by') . ": </b><a href=\"{$user_url}\">" . $user . "</a>, " . friendly_time($report->time_created) . "</p>";
echo "<p><b>" . elgg_echo('reportedcontent:objecttitle') . ": </b>" . $report->title;
echo "<br /><a onclick=\"elgg_slide_toggle(this,'.reported_content','.container{$id}');\" class='details_link'>" . elgg_echo('reportedcontent:moreinfo') . "</a></p>";
echo "<div class='details container{$id} hidden'>";
echo "<p><b>" . elgg_echo('reportedcontent:objecturl') . ": </b><a href=\"{$report->address}\">" . elgg_echo('reportedcontent:visit') . "</a></p>";
echo "<p><b>" . elgg_echo('reportedcontent:reason') . ": </b>" .$report->description . "</p>";
echo "</div></div>";
}
} else {
echo "<p class='margin_top'>".elgg_echo('reportedcontent:none')."</p>";
}
|