Remove old images and logos
[elgg.git] / units / files / files_user_info_menu.php
blobc458fa4d27490e943adc42be65ba85b722d680a2
1 <?php
3 global $page_owner;
4 $profile_id = $page_owner;
5 $url = url;
7 if ($page_owner != -1 && $page_owner != $_SESSION['userid']) {
9 $posts = db_query("select count(*) as x from files where (".run("users:access_level_sql_where",$profile_id).") and files_owner = $profile_id");
10 $posts = $posts[0]->x;
12 if ($_SESSION['userid'] == $profile_id) {
13 $title = gettext("Your Files");
14 } else {
15 $title = gettext("Files");
18 if ($posts == 1) {
19 $filesstring = $posts . " file";
20 } else {
21 $filesstring = $posts . " files";
24 $weblog_username = run("users:id_to_name",$profile_id);
25 $fileStorage = gettext("File Storage"); // gettext variable
26 $body = <<< END
27 <ul>
28 <li><a href="{$url}{$weblog_username}/files/">$fileStorage</a> ($filesstring)</li>
29 <li>(<a href="{$url}{$weblog_username}/files/rss/">RSS</a>)</li>
30 </ul>
31 END;
33 $run_result .= "<li id=\"sidebar_files\">";
34 $run_result .= run("templates:draw", array(
35 'context' => 'sidebarholder',
36 'title' => $title,
37 'body' => $body
40 $run_result .= "</li>";