A series of changes to push Elgg's approach to themes in a more CSS driven direction...
[elgg.git] / units / communities / communities_owned.php
blob84ca0b2cc03fdb429c5cbe219ad84dc4d115b648
1 <?php
3 global $page_owner;
5 if ($page_owner != -1) {
6 if (run("users:type:get", $page_owner) == "person") {
7 $result = db_query("select users.ident, users.username, users.name from users
8 where users.owner = $page_owner
9 and users.user_type = 'community'");
10 if (sizeof($result) > 0) {
11 $body = "<ul>";
12 foreach($result as $row) {
13 $body .= "<li><a href=\"" . url . stripslashes($row->username) . "/\">" . stripslashes($row->name) . "</a></li>>";
15 $body .= "</ul>";
16 // $run_result .= $body;
17 $run_result .= "<li id=\"community_owned\">";
18 $run_result .= run("templates:draw", array(
19 'context' => 'sidebarholder',
20 'title' => gettext("Owned communities"),
21 'body' => $body
24 $run_result .= "</li>";
25 } else {
26 $run_result .= "";